[TOC]
# Service Workers
PWA中的關鍵技術之一是 Service Workers。 服務工作者本質上是瀏覽器內部的可編程網絡代理,它使您可以在瀏覽器需要發出網絡請求并分派請求,或從緩存或本地存儲中檢索請求的信息時“捕獲”。 這意味著Service Worker通過能夠檢測和響應應用程序中的離線或高延遲條件,使開發人員能夠提供具有離線功能的體驗。 有關服務人員的深入介紹,請查看Google的Matt Gaunt的這篇文章。
服務人員在Chrome和Firefox,Safari和Edge中提供支持,但在Internet Explorer中不提供支持。 有了Safari / iOS,Safari,Edge和Chrome以及適用于Android的Firefox都最近獲得了支持。
# CSS-in-JS
CSS-in-JS sounds just like what it is - instead of creating separate files for styling, the CSS is placed inside the JS files of the component. Writing CSS inside of your JS files may feel wrong and against your usual clean code standards, but some think this is beneficial as it helps keep everything you need for a component in one place. Actual CSS is generated when you use CSS-in-JS libraries and some even add support for non-native CSS features like nesting. Using this approach lets you stay in the context of your components, add isolation, scoped selectors, vendor prefixing, unit tests and more. Here are some of the most popular CSS-in-JS libraries: Styled Components, JSS-React, glamourous, Aphrodite and Styletron.
> https://www.telerik.com/blogs/all-things-react#what-is-react
# PropTypes
# Pure Components
# Preventing XSS vulnerabilities in React
# 參考
[React 的歷史](https://www.telerik.com/blogs/all-things-react#what-is-react)