diff --git a/404.html b/404.html index fc4f4ec81f..92b1129521 100644 --- a/404.html +++ b/404.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + +
diff --git a/acknowledgements.html b/acknowledgements.html index 8ec3ee005c..84b5ddb3c8 100644 --- a/acknowledgements.html +++ b/acknowledgements.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/02/jsfiddle-integration.html b/blog/2013/06/02/jsfiddle-integration.html index c8fa1de651..53cdedebf4 100644 --- a/blog/2013/06/02/jsfiddle-integration.html +++ b/blog/2013/06/02/jsfiddle-integration.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/05/why-react.html b/blog/2013/06/05/why-react.html index 7506f48682..f0e771ec09 100644 --- a/blog/2013/06/05/why-react.html +++ b/blog/2013/06/05/why-react.html @@ -29,18 +29,18 @@ and why would you want to use it? - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/12/community-roundup.html b/blog/2013/06/12/community-roundup.html index 56a6dc6df8..003a5097fc 100644 --- a/blog/2013/06/12/community-roundup.html +++ b/blog/2013/06/12/community-roundup.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/19/community-roundup-2.html b/blog/2013/06/19/community-roundup-2.html index 8140da9a70..2256f6d03f 100644 --- a/blog/2013/06/19/community-roundup-2.html +++ b/blog/2013/06/19/community-roundup-2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/21/react-v0-3-3.html b/blog/2013/06/21/react-v0-3-3.html index ee1013fa5b..500f56145f 100644 --- a/blog/2013/06/21/react-v0-3-3.html +++ b/blog/2013/06/21/react-v0-3-3.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/06/27/community-roundup-3.html b/blog/2013/06/27/community-roundup-3.html index 2ca4da4b93..8e18d0ba40 100644 --- a/blog/2013/06/27/community-roundup-3.html +++ b/blog/2013/06/27/community-roundup-3.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/02/react-v0-4-autobind-by-default.html b/blog/2013/07/02/react-v0-4-autobind-by-default.html index f773c884ed..ab33d467a5 100644 --- a/blog/2013/07/02/react-v0-4-autobind-by-default.html +++ b/blog/2013/07/02/react-v0-4-autobind-by-default.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/03/community-roundup-4.html b/blog/2013/07/03/community-roundup-4.html index 7add46caf9..2d2f23ac43 100644 --- a/blog/2013/07/03/community-roundup-4.html +++ b/blog/2013/07/03/community-roundup-4.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html b/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html index 67256c341c..acbbcbcd68 100644 --- a/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html +++ b/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/17/react-v0-4-0.html b/blog/2013/07/17/react-v0-4-0.html index dc4f6c18ea..e820950489 100644 --- a/blog/2013/07/17/react-v0-4-0.html +++ b/blog/2013/07/17/react-v0-4-0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/23/community-roundup-5.html b/blog/2013/07/23/community-roundup-5.html index 6d187b9706..bcdedd5659 100644 --- a/blog/2013/07/23/community-roundup-5.html +++ b/blog/2013/07/23/community-roundup-5.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/26/react-v0-4-1.html b/blog/2013/07/26/react-v0-4-1.html index f2f2dd3110..85c4715b72 100644 --- a/blog/2013/07/26/react-v0-4-1.html +++ b/blog/2013/07/26/react-v0-4-1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html b/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html index 8bda2549be..7e6bbe3ec6 100644 --- a/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html +++ b/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/08/05/community-roundup-6.html b/blog/2013/08/05/community-roundup-6.html index 6f2f5d6bc2..6a46cad731 100644 --- a/blog/2013/08/05/community-roundup-6.html +++ b/blog/2013/08/05/community-roundup-6.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/08/19/use-react-and-jsx-in-python-applications.html b/blog/2013/08/19/use-react-and-jsx-in-python-applications.html index e69f0c2d17..0a1e2ce2ee 100644 --- a/blog/2013/08/19/use-react-and-jsx-in-python-applications.html +++ b/blog/2013/08/19/use-react-and-jsx-in-python-applications.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/08/26/community-roundup-7.html b/blog/2013/08/26/community-roundup-7.html index 8c02481aaa..abc99b21e1 100644 --- a/blog/2013/08/26/community-roundup-7.html +++ b/blog/2013/08/26/community-roundup-7.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/09/24/community-roundup-8.html b/blog/2013/09/24/community-roundup-8.html index 641544954c..4be52720e8 100644 --- a/blog/2013/09/24/community-roundup-8.html +++ b/blog/2013/09/24/community-roundup-8.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/10/03/community-roundup-9.html b/blog/2013/10/03/community-roundup-9.html index fa23274d37..07ca6f9c7d 100644 --- a/blog/2013/10/03/community-roundup-9.html +++ b/blog/2013/10/03/community-roundup-9.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/10/16/react-v0.5.0.html b/blog/2013/10/16/react-v0.5.0.html index 6836f41144..60ddee0544 100644 --- a/blog/2013/10/16/react-v0.5.0.html +++ b/blog/2013/10/16/react-v0.5.0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/10/29/react-v0-5-1.html b/blog/2013/10/29/react-v0-5-1.html index 3eaed996d7..1da7d1f0b9 100644 --- a/blog/2013/10/29/react-v0-5-1.html +++ b/blog/2013/10/29/react-v0-5-1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/11/06/community-roundup-10.html b/blog/2013/11/06/community-roundup-10.html index 615932b98f..37f7dab96a 100644 --- a/blog/2013/11/06/community-roundup-10.html +++ b/blog/2013/11/06/community-roundup-10.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/11/18/community-roundup-11.html b/blog/2013/11/18/community-roundup-11.html index 7b3a314e26..28ea48ab25 100644 --- a/blog/2013/11/18/community-roundup-11.html +++ b/blog/2013/11/18/community-roundup-11.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/12/18/react-v0.5.2-v0.4.2.html b/blog/2013/12/18/react-v0.5.2-v0.4.2.html index 5dab436ab3..7d18407b34 100644 --- a/blog/2013/12/18/react-v0.5.2-v0.4.2.html +++ b/blog/2013/12/18/react-v0.5.2-v0.4.2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/12/19/react-v0.8.0.html b/blog/2013/12/19/react-v0.8.0.html index de25dce918..5883c4a3e7 100644 --- a/blog/2013/12/19/react-v0.8.0.html +++ b/blog/2013/12/19/react-v0.8.0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/12/23/community-roundup-12.html b/blog/2013/12/23/community-roundup-12.html index 5c720783bd..8fea2566f2 100644 --- a/blog/2013/12/23/community-roundup-12.html +++ b/blog/2013/12/23/community-roundup-12.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2013/12/30/community-roundup-13.html b/blog/2013/12/30/community-roundup-13.html index 195bf8d1e6..32fda655a6 100644 --- a/blog/2013/12/30/community-roundup-13.html +++ b/blog/2013/12/30/community-roundup-13.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/01/02/react-chrome-developer-tools.html b/blog/2014/01/02/react-chrome-developer-tools.html index 1ef755db81..8179f741db 100644 --- a/blog/2014/01/02/react-chrome-developer-tools.html +++ b/blog/2014/01/02/react-chrome-developer-tools.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/01/06/community-roundup-14.html b/blog/2014/01/06/community-roundup-14.html index 5f9ac96d50..a279eb7a3c 100644 --- a/blog/2014/01/06/community-roundup-14.html +++ b/blog/2014/01/06/community-roundup-14.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/02/05/community-roundup-15.html b/blog/2014/02/05/community-roundup-15.html index e2baaf7559..1d698b5573 100644 --- a/blog/2014/02/05/community-roundup-15.html +++ b/blog/2014/02/05/community-roundup-15.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/02/15/community-roundup-16.html b/blog/2014/02/15/community-roundup-16.html index 945e85c90f..1893ec956c 100644 --- a/blog/2014/02/15/community-roundup-16.html +++ b/blog/2014/02/15/community-roundup-16.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/02/16/react-v0.9-rc1.html b/blog/2014/02/16/react-v0.9-rc1.html index 4fa6842825..c41e265fb6 100644 --- a/blog/2014/02/16/react-v0.9-rc1.html +++ b/blog/2014/02/16/react-v0.9-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/02/20/react-v0.9.html b/blog/2014/02/20/react-v0.9.html index 2a028f43d5..4ce499bbf5 100644 --- a/blog/2014/02/20/react-v0.9.html +++ b/blog/2014/02/20/react-v0.9.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/02/24/community-roundup-17.html b/blog/2014/02/24/community-roundup-17.html index 6fd0a997b7..58dfb01cb5 100644 --- a/blog/2014/02/24/community-roundup-17.html +++ b/blog/2014/02/24/community-roundup-17.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/03/14/community-roundup-18.html b/blog/2014/03/14/community-roundup-18.html index e2bdcaa13f..8007b3cd1f 100644 --- a/blog/2014/03/14/community-roundup-18.html +++ b/blog/2014/03/14/community-roundup-18.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/03/19/react-v0.10-rc1.html b/blog/2014/03/19/react-v0.10-rc1.html index 13fa8fab1e..46ceca98c7 100644 --- a/blog/2014/03/19/react-v0.10-rc1.html +++ b/blog/2014/03/19/react-v0.10-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/03/21/react-v0.10.html b/blog/2014/03/21/react-v0.10.html index a4438b3fc6..5b03d2f196 100644 --- a/blog/2014/03/21/react-v0.10.html +++ b/blog/2014/03/21/react-v0.10.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/03/28/the-road-to-1.0.html b/blog/2014/03/28/the-road-to-1.0.html index c21c6110eb..24ff416aa3 100644 --- a/blog/2014/03/28/the-road-to-1.0.html +++ b/blog/2014/03/28/the-road-to-1.0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/04/04/reactnet.html b/blog/2014/04/04/reactnet.html index b0d6e61c8b..3c88982dc9 100644 --- a/blog/2014/04/04/reactnet.html +++ b/blog/2014/04/04/reactnet.html @@ -31,18 +31,18 @@ It has several purposes: - - - - - - - - + + + + + + + + diff --git a/blog/2014/05/06/flux.html b/blog/2014/05/06/flux.html index 5a83b7364e..4a5f947e6a 100644 --- a/blog/2014/05/06/flux.html +++ b/blog/2014/05/06/flux.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/05/29/one-year-of-open-source-react.html b/blog/2014/05/29/one-year-of-open-source-react.html index c6a82ebc6f..ae3cc1e894 100644 --- a/blog/2014/05/29/one-year-of-open-source-react.html +++ b/blog/2014/05/29/one-year-of-open-source-react.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/06/27/community-roundup-19.html b/blog/2014/06/27/community-roundup-19.html index 5d4e0cb57f..7b3e62ae52 100644 --- a/blog/2014/06/27/community-roundup-19.html +++ b/blog/2014/06/27/community-roundup-19.html @@ -30,18 +30,18 @@ Ever wanted to find developers who also share the same interest in React than yo - - - - - - - - + + + + + + + + diff --git a/blog/2014/07/13/react-v0.11-rc1.html b/blog/2014/07/13/react-v0.11-rc1.html index bd13c7223f..8b68d6f0ce 100644 --- a/blog/2014/07/13/react-v0.11-rc1.html +++ b/blog/2014/07/13/react-v0.11-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/07/17/react-v0.11.html b/blog/2014/07/17/react-v0.11.html index fe0890cc56..ce7bdc9929 100644 --- a/blog/2014/07/17/react-v0.11.html +++ b/blog/2014/07/17/react-v0.11.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/07/25/react-v0.11.1.html b/blog/2014/07/25/react-v0.11.1.html index 48f43837f1..672563abf7 100644 --- a/blog/2014/07/25/react-v0.11.1.html +++ b/blog/2014/07/25/react-v0.11.1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/07/28/community-roundup-20.html b/blog/2014/07/28/community-roundup-20.html index b2f7bfee7c..ca91277621 100644 --- a/blog/2014/07/28/community-roundup-20.html +++ b/blog/2014/07/28/community-roundup-20.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/07/30/flux-actions-and-the-dispatcher.html b/blog/2014/07/30/flux-actions-and-the-dispatcher.html index d16080c7ba..5abcb38796 100644 --- a/blog/2014/07/30/flux-actions-and-the-dispatcher.html +++ b/blog/2014/07/30/flux-actions-and-the-dispatcher.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/08/03/community-roundup-21.html b/blog/2014/08/03/community-roundup-21.html index 7e194674d6..f4f1f1af67 100644 --- a/blog/2014/08/03/community-roundup-21.html +++ b/blog/2014/08/03/community-roundup-21.html @@ -30,18 +30,18 @@ Ryan Florence and Michael Jackson ported Ember's router to React in a projec - - - - - - - - + + + + + + + + diff --git a/blog/2014/09/03/introducing-the-jsx-specification.html b/blog/2014/09/03/introducing-the-jsx-specification.html index b825a4e7c6..687a886ee6 100644 --- a/blog/2014/09/03/introducing-the-jsx-specification.html +++ b/blog/2014/09/03/introducing-the-jsx-specification.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/09/12/community-round-up-22.html b/blog/2014/09/12/community-round-up-22.html index 25f49050d8..5574a7c282 100644 --- a/blog/2014/09/12/community-round-up-22.html +++ b/blog/2014/09/12/community-round-up-22.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/09/16/react-v0.11.2.html b/blog/2014/09/16/react-v0.11.2.html index 2733667fad..761f99e334 100644 --- a/blog/2014/09/16/react-v0.11.2.html +++ b/blog/2014/09/16/react-v0.11.2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/09/24/testing-flux-applications.html b/blog/2014/09/24/testing-flux-applications.html index f5bfd28fb5..2a423ec074 100644 --- a/blog/2014/09/24/testing-flux-applications.html +++ b/blog/2014/09/24/testing-flux-applications.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/10/14/introducing-react-elements.html b/blog/2014/10/14/introducing-react-elements.html index 5c8fce9c6f..8150730a0c 100644 --- a/blog/2014/10/14/introducing-react-elements.html +++ b/blog/2014/10/14/introducing-react-elements.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/10/16/react-v0.12-rc1.html b/blog/2014/10/16/react-v0.12-rc1.html index 69534f52f0..4a5cce2322 100644 --- a/blog/2014/10/16/react-v0.12-rc1.html +++ b/blog/2014/10/16/react-v0.12-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/10/17/community-roundup-23.html b/blog/2014/10/17/community-roundup-23.html index 0be09fe7ed..d79117727e 100644 --- a/blog/2014/10/17/community-roundup-23.html +++ b/blog/2014/10/17/community-roundup-23.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/10/27/react-js-conf.html b/blog/2014/10/27/react-js-conf.html index c613f63ecf..9f07d32316 100644 --- a/blog/2014/10/27/react-js-conf.html +++ b/blog/2014/10/27/react-js-conf.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/10/28/react-v0.12.html b/blog/2014/10/28/react-v0.12.html index 177063ee77..c82fa5803a 100644 --- a/blog/2014/10/28/react-v0.12.html +++ b/blog/2014/10/28/react-v0.12.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/11/24/react-js-conf-updates.html b/blog/2014/11/24/react-js-conf-updates.html index 3ecf01dc76..15c0e38665 100644 --- a/blog/2014/11/24/react-js-conf-updates.html +++ b/blog/2014/11/24/react-js-conf-updates.html @@ -30,18 +30,18 @@ amazed that 600 people requested to be notified when ticket go on sale. This is - - - - - - - - + + + + + + + + diff --git a/blog/2014/11/25/community-roundup-24.html b/blog/2014/11/25/community-roundup-24.html index 605734383f..b6ecad66c9 100644 --- a/blog/2014/11/25/community-roundup-24.html +++ b/blog/2014/11/25/community-roundup-24.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/12/18/react-v0.12.2.html b/blog/2014/12/18/react-v0.12.2.html index 100f40d8cc..98be572e43 100644 --- a/blog/2014/12/18/react-v0.12.2.html +++ b/blog/2014/12/18/react-v0.12.2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2014/12/19/react-js-conf-diversity-scholarship.html b/blog/2014/12/19/react-js-conf-diversity-scholarship.html index 68f9693efc..9d97392ea2 100644 --- a/blog/2014/12/19/react-js-conf-diversity-scholarship.html +++ b/blog/2014/12/19/react-js-conf-diversity-scholarship.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/01/27/react-v0.13.0-beta-1.html b/blog/2015/01/27/react-v0.13.0-beta-1.html index 48616335c1..bdf6b036e2 100644 --- a/blog/2015/01/27/react-v0.13.0-beta-1.html +++ b/blog/2015/01/27/react-v0.13.0-beta-1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/02/18/react-conf-roundup-2015.html b/blog/2015/02/18/react-conf-roundup-2015.html index 36d3c19c1b..28de328cce 100644 --- a/blog/2015/02/18/react-conf-roundup-2015.html +++ b/blog/2015/02/18/react-conf-roundup-2015.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/02/20/introducing-relay-and-graphql.html b/blog/2015/02/20/introducing-relay-and-graphql.html index e167bab398..d4cf9eed17 100644 --- a/blog/2015/02/20/introducing-relay-and-graphql.html +++ b/blog/2015/02/20/introducing-relay-and-graphql.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/02/24/react-v0.13-rc1.html b/blog/2015/02/24/react-v0.13-rc1.html index 3a815a0304..84738f1bb5 100644 --- a/blog/2015/02/24/react-v0.13-rc1.html +++ b/blog/2015/02/24/react-v0.13-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/02/24/streamlining-react-elements.html b/blog/2015/02/24/streamlining-react-elements.html index 9eb744500d..90dfc5aa3a 100644 --- a/blog/2015/02/24/streamlining-react-elements.html +++ b/blog/2015/02/24/streamlining-react-elements.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/03/react-v0.13-rc2.html b/blog/2015/03/03/react-v0.13-rc2.html index 9a0296af26..5dc46b0441 100644 --- a/blog/2015/03/03/react-v0.13-rc2.html +++ b/blog/2015/03/03/react-v0.13-rc2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/04/community-roundup-25.html b/blog/2015/03/04/community-roundup-25.html index b71d218f22..790f681dcd 100644 --- a/blog/2015/03/04/community-roundup-25.html +++ b/blog/2015/03/04/community-roundup-25.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/10/react-v0.13.html b/blog/2015/03/10/react-v0.13.html index 038a201608..c26354232b 100644 --- a/blog/2015/03/10/react-v0.13.html +++ b/blog/2015/03/10/react-v0.13.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/16/react-v0.13.1.html b/blog/2015/03/16/react-v0.13.1.html index f1a2972712..d2f4a8c01c 100644 --- a/blog/2015/03/16/react-v0.13.1.html +++ b/blog/2015/03/16/react-v0.13.1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/19/building-the-facebook-news-feed-with-relay.html b/blog/2015/03/19/building-the-facebook-news-feed-with-relay.html index 6757377ec3..3957234b28 100644 --- a/blog/2015/03/19/building-the-facebook-news-feed-with-relay.html +++ b/blog/2015/03/19/building-the-facebook-news-feed-with-relay.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/26/introducing-react-native.html b/blog/2015/03/26/introducing-react-native.html index ff634d9af8..8b4841d80f 100644 --- a/blog/2015/03/26/introducing-react-native.html +++ b/blog/2015/03/26/introducing-react-native.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/03/30/community-roundup-26.html b/blog/2015/03/30/community-roundup-26.html index 38d0d20f69..c59922f88b 100644 --- a/blog/2015/03/30/community-roundup-26.html +++ b/blog/2015/03/30/community-roundup-26.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/04/17/react-native-v0.4.html b/blog/2015/04/17/react-native-v0.4.html index 844e751979..f2776aa2bb 100644 --- a/blog/2015/04/17/react-native-v0.4.html +++ b/blog/2015/04/17/react-native-v0.4.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/04/18/react-v0.13.2.html b/blog/2015/04/18/react-v0.13.2.html index 1a43e77d17..e7c612b8f4 100644 --- a/blog/2015/04/18/react-v0.13.2.html +++ b/blog/2015/04/18/react-v0.13.2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/05/01/graphql-introduction.html b/blog/2015/05/01/graphql-introduction.html index 4d9b61f7b1..c82c3b5069 100644 --- a/blog/2015/05/01/graphql-introduction.html +++ b/blog/2015/05/01/graphql-introduction.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/05/08/react-v0.13.3.html b/blog/2015/05/08/react-v0.13.3.html index 63c76d141a..84ce3d1d3e 100644 --- a/blog/2015/05/08/react-v0.13.3.html +++ b/blog/2015/05/08/react-v0.13.3.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/05/22/react-native-release-process.html b/blog/2015/05/22/react-native-release-process.html index c07526f1d7..2a19ed00cf 100644 --- a/blog/2015/05/22/react-native-release-process.html +++ b/blog/2015/05/22/react-native-release-process.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/06/12/deprecating-jstransform-and-react-tools.html b/blog/2015/06/12/deprecating-jstransform-and-react-tools.html index 80f5ba554d..50fde445ff 100644 --- a/blog/2015/06/12/deprecating-jstransform-and-react-tools.html +++ b/blog/2015/06/12/deprecating-jstransform-and-react-tools.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/07/03/react-v0.14-beta-1.html b/blog/2015/07/03/react-v0.14-beta-1.html index 3c667ab2d9..3d9332fd52 100644 --- a/blog/2015/07/03/react-v0.14-beta-1.html +++ b/blog/2015/07/03/react-v0.14-beta-1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/08/03/new-react-devtools-beta.html b/blog/2015/08/03/new-react-devtools-beta.html index a095196267..c6f2da812b 100644 --- a/blog/2015/08/03/new-react-devtools-beta.html +++ b/blog/2015/08/03/new-react-devtools-beta.html @@ -29,18 +29,18 @@ out! - - - - - - - - + + + + + + + + diff --git a/blog/2015/08/11/relay-technical-preview.html b/blog/2015/08/11/relay-technical-preview.html index 4aa930c3f0..4d23a1850c 100644 --- a/blog/2015/08/11/relay-technical-preview.html +++ b/blog/2015/08/11/relay-technical-preview.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/08/13/reacteurope-roundup.html b/blog/2015/08/13/reacteurope-roundup.html index 5adf818296..bb096346ec 100644 --- a/blog/2015/08/13/reacteurope-roundup.html +++ b/blog/2015/08/13/reacteurope-roundup.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/09/02/new-react-developer-tools.html b/blog/2015/09/02/new-react-developer-tools.html index cf4736996c..8e099875fb 100644 --- a/blog/2015/09/02/new-react-developer-tools.html +++ b/blog/2015/09/02/new-react-developer-tools.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/09/10/react-v0.14-rc1.html b/blog/2015/09/10/react-v0.14-rc1.html index dc42183bc4..f4874d9b08 100644 --- a/blog/2015/09/10/react-v0.14-rc1.html +++ b/blog/2015/09/10/react-v0.14-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/09/14/community-roundup-27.html b/blog/2015/09/14/community-roundup-27.html index a275350572..9957dc6a68 100644 --- a/blog/2015/09/14/community-roundup-27.html +++ b/blog/2015/09/14/community-roundup-27.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/10/01/react-render-and-top-level-api.html b/blog/2015/10/01/react-render-and-top-level-api.html index 1c8912e10f..f9eaaa1f80 100644 --- a/blog/2015/10/01/react-render-and-top-level-api.html +++ b/blog/2015/10/01/react-render-and-top-level-api.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/10/07/react-v0.14.html b/blog/2015/10/07/react-v0.14.html index fe9da9bb2b..4036cae6f7 100644 --- a/blog/2015/10/07/react-v0.14.html +++ b/blog/2015/10/07/react-v0.14.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/10/19/reactiflux-is-moving-to-discord.html b/blog/2015/10/19/reactiflux-is-moving-to-discord.html index b24f224c85..24e104dc6b 100644 --- a/blog/2015/10/19/reactiflux-is-moving-to-discord.html +++ b/blog/2015/10/19/reactiflux-is-moving-to-discord.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/10/28/react-v0.14.1.html b/blog/2015/10/28/react-v0.14.1.html index 726a56bb93..e9730ad512 100644 --- a/blog/2015/10/28/react-v0.14.1.html +++ b/blog/2015/10/28/react-v0.14.1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/11/02/react-v0.14.2.html b/blog/2015/11/02/react-v0.14.2.html index 4a915a111d..adf0508328 100644 --- a/blog/2015/11/02/react-v0.14.2.html +++ b/blog/2015/11/02/react-v0.14.2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/11/18/react-v0.14.3.html b/blog/2015/11/18/react-v0.14.3.html index de173b2d6b..bdee3f4075 100644 --- a/blog/2015/11/18/react-v0.14.3.html +++ b/blog/2015/11/18/react-v0.14.3.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.html b/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.html index e688be5e9b..3bbe21039e 100644 --- a/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.html +++ b/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/12/16/ismounted-antipattern.html b/blog/2015/12/16/ismounted-antipattern.html index 2874567bdb..d8174f1dcb 100644 --- a/blog/2015/12/16/ismounted-antipattern.html +++ b/blog/2015/12/16/ismounted-antipattern.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/12/18/react-components-elements-and-instances.html b/blog/2015/12/18/react-components-elements-and-instances.html index 44887bcb16..45361895d9 100644 --- a/blog/2015/12/18/react-components-elements-and-instances.html +++ b/blog/2015/12/18/react-components-elements-and-instances.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2015/12/29/react-v0.14.4.html b/blog/2015/12/29/react-v0.14.4.html index 1712b471b7..c4dd9b2472 100644 --- a/blog/2015/12/29/react-v0.14.4.html +++ b/blog/2015/12/29/react-v0.14.4.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html b/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html index 93926c651d..a601c24b42 100644 --- a/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html +++ b/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/01/12/discontinuing-ie8-support.html b/blog/2016/01/12/discontinuing-ie8-support.html index 201068c3fd..526ff86c7d 100644 --- a/blog/2016/01/12/discontinuing-ie8-support.html +++ b/blog/2016/01/12/discontinuing-ie8-support.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/02/19/new-versioning-scheme.html b/blog/2016/02/19/new-versioning-scheme.html index 83f4152bbd..52ef994e17 100644 --- a/blog/2016/02/19/new-versioning-scheme.html +++ b/blog/2016/02/19/new-versioning-scheme.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/03/07/react-v15-rc1.html b/blog/2016/03/07/react-v15-rc1.html index d76b28fb4a..b5434c1e19 100644 --- a/blog/2016/03/07/react-v15-rc1.html +++ b/blog/2016/03/07/react-v15-rc1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/03/16/react-v15-rc2.html b/blog/2016/03/16/react-v15-rc2.html index 749fbf8cc1..6dd1f421fd 100644 --- a/blog/2016/03/16/react-v15-rc2.html +++ b/blog/2016/03/16/react-v15-rc2.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/03/29/react-v0.14.8.html b/blog/2016/03/29/react-v0.14.8.html index e5cd478e6f..fd4cb93c75 100644 --- a/blog/2016/03/29/react-v0.14.8.html +++ b/blog/2016/03/29/react-v0.14.8.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/04/07/react-v15.html b/blog/2016/04/07/react-v15.html index 2a2bf0dd2d..fbc510d3ea 100644 --- a/blog/2016/04/07/react-v15.html +++ b/blog/2016/04/07/react-v15.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/04/08/react-v15.0.1.html b/blog/2016/04/08/react-v15.0.1.html index 7305f11a15..264b03fb48 100644 --- a/blog/2016/04/08/react-v15.0.1.html +++ b/blog/2016/04/08/react-v15.0.1.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/07/11/introducing-reacts-error-code-system.html b/blog/2016/07/11/introducing-reacts-error-code-system.html index 24da12f21d..0a6b69993b 100644 --- a/blog/2016/07/11/introducing-reacts-error-code-system.html +++ b/blog/2016/07/11/introducing-reacts-error-code-system.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/07/13/mixins-considered-harmful.html b/blog/2016/07/13/mixins-considered-harmful.html index a40543d019..2203cc0c10 100644 --- a/blog/2016/07/13/mixins-considered-harmful.html +++ b/blog/2016/07/13/mixins-considered-harmful.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/07/22/create-apps-with-no-configuration.html b/blog/2016/07/22/create-apps-with-no-configuration.html index 9ca34a991e..82e495f498 100644 --- a/blog/2016/07/22/create-apps-with-no-configuration.html +++ b/blog/2016/07/22/create-apps-with-no-configuration.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/08/05/relay-state-of-the-state.html b/blog/2016/08/05/relay-state-of-the-state.html index 5f9585da78..96402b1d09 100644 --- a/blog/2016/08/05/relay-state-of-the-state.html +++ b/blog/2016/08/05/relay-state-of-the-state.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/09/28/our-first-50000-stars.html b/blog/2016/09/28/our-first-50000-stars.html index 294f4ebf26..f8f68bfd65 100644 --- a/blog/2016/09/28/our-first-50000-stars.html +++ b/blog/2016/09/28/our-first-50000-stars.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2016/11/16/react-v15.4.0.html b/blog/2016/11/16/react-v15.4.0.html index 85ca3e0237..72cdce0b50 100644 --- a/blog/2016/11/16/react-v15.4.0.html +++ b/blog/2016/11/16/react-v15.4.0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/2017/04/07/react-v15.5.0.html b/blog/2017/04/07/react-v15.5.0.html index 225e8e9375..c95a8a3a8f 100644 --- a/blog/2017/04/07/react-v15.5.0.html +++ b/blog/2017/04/07/react-v15.5.0.html @@ -28,18 +28,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/all.html b/blog/all.html index cb55d47a7f..652a5e38bd 100644 --- a/blog/all.html +++ b/blog/all.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/index.html b/blog/index.html index cc3a91b70c..8303a0d984 100644 --- a/blog/index.html +++ b/blog/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page10/index.html b/blog/page10/index.html index 6a5c0f9e61..1e1d09a5e8 100644 --- a/blog/page10/index.html +++ b/blog/page10/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page11/index.html b/blog/page11/index.html index 5a0a9c4318..e126b6e8b5 100644 --- a/blog/page11/index.html +++ b/blog/page11/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page12/index.html b/blog/page12/index.html index 41d0f61d98..5bb3000445 100644 --- a/blog/page12/index.html +++ b/blog/page12/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page13/index.html b/blog/page13/index.html index d3cea9d808..d89de81af5 100644 --- a/blog/page13/index.html +++ b/blog/page13/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page14/index.html b/blog/page14/index.html index 9503635bd3..9104999a72 100644 --- a/blog/page14/index.html +++ b/blog/page14/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page15/index.html b/blog/page15/index.html index 0a29852c69..080c436d1b 100644 --- a/blog/page15/index.html +++ b/blog/page15/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page16/index.html b/blog/page16/index.html index 15e4275b49..81fd625153 100644 --- a/blog/page16/index.html +++ b/blog/page16/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page17/index.html b/blog/page17/index.html index f04ae185f2..bea9094f43 100644 --- a/blog/page17/index.html +++ b/blog/page17/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page18/index.html b/blog/page18/index.html index 3b8406fbf2..01c84de44f 100644 --- a/blog/page18/index.html +++ b/blog/page18/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page19/index.html b/blog/page19/index.html index f7df7c2208..10d13ec75d 100644 --- a/blog/page19/index.html +++ b/blog/page19/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page2/index.html b/blog/page2/index.html index 9f216e29d4..d98cb961c7 100644 --- a/blog/page2/index.html +++ b/blog/page2/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page20/index.html b/blog/page20/index.html index 231297715f..01d975fcca 100644 --- a/blog/page20/index.html +++ b/blog/page20/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page21/index.html b/blog/page21/index.html index d5ddb32b51..b6a362b6c9 100644 --- a/blog/page21/index.html +++ b/blog/page21/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page22/index.html b/blog/page22/index.html index 8bc64e9ba7..f391d1a14c 100644 --- a/blog/page22/index.html +++ b/blog/page22/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page3/index.html b/blog/page3/index.html index 8ddc145695..8563125577 100644 --- a/blog/page3/index.html +++ b/blog/page3/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page4/index.html b/blog/page4/index.html index 392d8119c3..6249e26595 100644 --- a/blog/page4/index.html +++ b/blog/page4/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page5/index.html b/blog/page5/index.html index 52f618d63c..d25508c78e 100644 --- a/blog/page5/index.html +++ b/blog/page5/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page6/index.html b/blog/page6/index.html index 75377df571..ea3db3ea83 100644 --- a/blog/page6/index.html +++ b/blog/page6/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page7/index.html b/blog/page7/index.html index 6e59f3e4c0..978b574838 100644 --- a/blog/page7/index.html +++ b/blog/page7/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page8/index.html b/blog/page8/index.html index 4131a01693..7e08b54ce0 100644 --- a/blog/page8/index.html +++ b/blog/page8/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/blog/page9/index.html b/blog/page9/index.html index a469c4e4d8..6ab11f2784 100644 --- a/blog/page9/index.html +++ b/blog/page9/index.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/community/conferences.html b/community/conferences.html index 523f5cf376..27ef967080 100644 --- a/community/conferences.html +++ b/community/conferences.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/community/support.html b/community/support.html index 791650fd86..77a5619d2a 100644 --- a/community/support.html +++ b/community/support.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/community/videos.html b/community/videos.html index 3b179744c3..c0b0db293d 100644 --- a/community/videos.html +++ b/community/videos.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + diff --git a/contributing/codebase-overview.html b/contributing/codebase-overview.html index ff6af93b5b..64cfd5466d 100644 --- a/contributing/codebase-overview.html +++ b/contributing/codebase-overview.html @@ -27,18 +27,18 @@ - - - - - - - - + + + + + + + + @@ -130,6 +130,7 @@src is the source code of React. If your change is related to the code, src is where you'll spend most of your time.docs is the React documentation website. When you change APIs, make sure to update the relevant Markdown files.fixtures contains a few small React test applications for contributors.packages contains metadata (such as package.json) for all packages in the React repository. Nevertheless, their source code is still located inside src.build is the build output of React. It is not in the repository but it will appear in your React clone after you build it for the first time.npm run flow locally to check your code with Flow.
+ npm run flow locally to check your code with Flow.
The best way to get your bug fixed is to provide a reduced test case. This JSFiddle template is a great starting point.
+The best way to get your bug fixed is to provide a reduced test case. This JSFiddle template is a great starting point.
npm run li
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -375,6 +380,11 @@ You can check the status of your code styling by simply running npm run li
+
+ Integrating with Other Libraries
+
+
+
diff --git a/contributing/implementation-notes.html b/contributing/implementation-notes.html
index 07f100da43..61c7b3657e 100644
--- a/contributing/implementation-notes.html
+++ b/contributing/implementation-notes.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -980,6 +980,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -1025,6 +1030,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/addons.html b/docs/addons.html
index 8dc45be733..f570c79258 100644
--- a/docs/addons.html
+++ b/docs/addons.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -215,6 +215,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -260,6 +265,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/animation.html b/docs/animation.html
index 6cfd877638..5920b68e08 100644
--- a/docs/animation.html
+++ b/docs/animation.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -459,6 +459,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -504,6 +509,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/components-and-props.html b/docs/components-and-props.html
index 64bda48037..0c4353608e 100644
--- a/docs/components-and-props.html
+++ b/docs/components-and-props.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -389,6 +389,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -434,6 +439,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/composition-vs-inheritance.html b/docs/composition-vs-inheritance.html
index 4b6692da0e..9fb1fd6afe 100644
--- a/docs/composition-vs-inheritance.html
+++ b/docs/composition-vs-inheritance.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -321,6 +321,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -366,6 +371,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/conditional-rendering.html b/docs/conditional-rendering.html
index d7f1d637db..2ac15ced41 100644
--- a/docs/conditional-rendering.html
+++ b/docs/conditional-rendering.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -383,6 +383,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -428,6 +433,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/conferences-it-IT.html b/docs/conferences-it-IT.html
index ba4347405b..3283d17331 100644
--- a/docs/conferences-it-IT.html
+++ b/docs/conferences-it-IT.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/docs/conferences-ko-KR.html b/docs/conferences-ko-KR.html
index df9772c193..83e9b35f01 100644
--- a/docs/conferences-ko-KR.html
+++ b/docs/conferences-ko-KR.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/docs/conferences-zh-CN.html b/docs/conferences-zh-CN.html
index 8acd802ab7..8aa1422941 100644
--- a/docs/conferences-zh-CN.html
+++ b/docs/conferences-zh-CN.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/docs/context.html b/docs/context.html
index 664c3a124a..2beab61644 100644
--- a/docs/context.html
+++ b/docs/context.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -365,6 +365,11 @@ You can do this directly in React with the powerful "context" API.
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -410,6 +415,11 @@ You can do this directly in React with the powerful "context" API.
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/create-fragment.html b/docs/create-fragment.html
index 629f056c7b..265c136b5f 100644
--- a/docs/create-fragment.html
+++ b/docs/create-fragment.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -217,6 +217,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -262,6 +267,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/dom-elements.html b/docs/dom-elements.html
index 58c493c530..8c32c9c6d8 100644
--- a/docs/dom-elements.html
+++ b/docs/dom-elements.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -311,6 +311,11 @@ xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -356,6 +361,11 @@ xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/error-decoder.html b/docs/error-decoder.html
index 8ed92c5560..1b72588eee 100644
--- a/docs/error-decoder.html
+++ b/docs/error-decoder.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -179,6 +179,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -224,6 +229,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/events.html b/docs/events.html
index 458e080f28..659cce9971 100644
--- a/docs/events.html
+++ b/docs/events.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -428,6 +428,11 @@ onTimeUpdate onVolumeChange onWaiting
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -473,6 +478,11 @@ onTimeUpdate onVolumeChange onWaiting
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/forms.html b/docs/forms.html
index cf8fb13cc7..f0abbff12a 100644
--- a/docs/forms.html
+++ b/docs/forms.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -394,6 +394,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -439,6 +444,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/handling-events.html b/docs/handling-events.html
index 6481338da9..044e61e7a1 100644
--- a/docs/handling-events.html
+++ b/docs/handling-events.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -286,6 +286,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -331,6 +336,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/hello-world.html b/docs/hello-world.html
index 9342d13857..30958f9e7c 100644
--- a/docs/hello-world.html
+++ b/docs/hello-world.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -191,6 +191,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -236,6 +241,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/higher-order-components.html b/docs/higher-order-components.html
index 0928a41d76..55f8e79b99 100644
--- a/docs/higher-order-components.html
+++ b/docs/higher-order-components.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -531,6 +531,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -576,6 +581,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/installation.html b/docs/installation.html
index 41b8401f57..392a969d3a 100644
--- a/docs/installation.html
+++ b/docs/installation.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -469,6 +469,11 @@ function selectTabForHashLink() {
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -514,6 +519,11 @@ function selectTabForHashLink() {
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/integrating-with-other-libraries.html b/docs/integrating-with-other-libraries.html
new file mode 100644
index 0000000000..88012cfb40
--- /dev/null
+++ b/docs/integrating-with-other-libraries.html
@@ -0,0 +1,764 @@
+
+
+
+
+
+
+
+
+ Integrating with Other Libraries - React
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Edit on GitHub
+
+ Integrating with Other Libraries
+
+
+
+ React can be used in any web application. It can be embedded in other applications and, with a little care, other applications can be embedded in React. This guide will examine some of the more common use cases, focusing on integration with jQuery and Backbone, but the same ideas can be applied to integrating components with any existing code.
+
+Integrating with DOM Manipulation Plugins
+
+React is unaware of changes made to the DOM outside of React. It determines updates based on its own internal representation, and if the same DOM nodes are manipulated by another library, React gets confused and has no way to recover.
+
+This does not mean it is impossible or even necessarily difficult to combine React with other ways of affecting the DOM, you just have to be mindful of what each are doing.
+
+The easiest way to avoid conflicts is to prevent the React component from updating. You can do this by rendering elements that React has no reason to update, like an empty <div />.
+
+How to Approach the Problem
+
+To demonstrate this, let's sketch out a wrapper for a generic jQuery plugin.
+
+We will attach a ref to the root DOM element. Inside componentDidMount, we will get a reference to it so we can pass it to the jQuery plugin.
+
+To prevent React from touching the DOM after mounting, we will return an empty <div /> from the render() method. The <div /> element has no properties or children, so React has no reason to update it, leaving the jQuery plugin free to manage that part of the DOM:
+class SomePlugin extends React.Component {
+ componentDidMount() {
+ this.$el = $(this.el);
+ this.$el.somePlugin();
+ }
+
+ componentWillUnmount() {
+ this.$el.somePlugin('destroy');
+ }
+
+ render() {
+ return <div ref={el => this.el = el} />;
+ }
+}
+
+Note that we defined both componentDidMount and componentWillUnmount lifecycle hooks. Many jQuery plugins attach event listeners to the DOM so it's important to detach them in componentWillUnmount. If the plugin does not provide a method for cleanup, you will probably have to provide your own, remembering to remove any event listeners the plugin registered to prevent memory leaks.
+
+Integrating with jQuery Chosen Plugin
+
+For a more concrete example of these concepts, let's write a minimal wrapper for the plugin Chosen, which augments <select> inputs.
+
+
+Note:
+
+Just because it's possible, doesn't mean that it's the best approach for React apps. We encourage you to use React components when you can. React components are easier to reuse in React applications, and often provide more control over their behavior and appearance.
+
+
+First, let's look at what Chosen does to the DOM.
+
+If you call it on a <select> DOM node, it reads the attributes off of the original DOM node, hides it with an inline style, and then appends a separate DOM node with its own visual representation right after the <select>. Then it fires jQuery events to notify us about the changes.
+
+Let's say that this is the API we're striving for with our <Chosen> wrapper React component:
+function Example() {
+ return (
+ <Chosen onChange={value => console.log(value)}>
+ <option>vanilla</option>
+ <option>chocolate</option>
+ <option>strawberry</option>
+ </Chosen>
+ );
+}
+
+We will implement it as an uncontrolled component for simplicity.
+
+First, we will create an empty component with a render() method where we return <select> wrapped in a <div>:
+class Chosen extends React.Component {
+ render() {
+ return (
+ <div>
+ <select className="Chosen-select" ref={el => this.el = el}>
+ {this.props.children}
+ </select>
+ </div>
+ );
+ }
+}
+
+Notice how we wrapped <select> in an extra <div>. This is necessary because Chosen will append another DOM element right after the <select> node we passed to it. However, as far as React is concerned, <div> always only has a single child. This is how we ensure that React updates won't conflict with the extra DOM node appended by Chosen. It is important that if you modify the DOM outside of React flow, you must ensure React doesn't have a reason to touch those DOM nodes.
+
+Next, we will implement the lifecycle hooks. We need to initialize Chosen with the ref to the <select> node in componentDidMount, and tear it down in componentWillUnmount:
+componentDidMount() {
+ this.$el = $(this.el);
+ this.$el.chosen();
+}
+
+componentWillUnmount() {
+ this.$el.chosen('destroy');
+}
+
+
+
+Note that React assigns no special meaning to the this.el field. It only works because we have previously assigned this field from a ref in the render() method:
+<select className="Chosen-select" ref={el => this.el = el}>
+
+This is enough to get our component to render, but we also want to be notified about the value changes. To do this, we will subscribe to the jQuery change event on the <select> managed by Chosen.
+
+We won't pass this.props.onChange directly to Chosen because component's props might change over time, and that includes event handlers. Instead, we will declare a handleChange() method that calls this.props.onChange, and subscribe it to the jQuery change event:
+componentDidMount() {
+ this.$el = $(this.el);
+ this.$el.chosen();
+
+ this.handleChange = this.handleChange.bind(this);
+ this.$el.on('change', this.handleChange);
+}
+
+componentWillUnmount() {
+ this.$el.off('change', this.handleChange);
+ this.$el.chosen('destroy');
+}
+
+handleChange(e) {
+ this.props.onChange(e.target.value);
+}
+
+
+
+Finally, there is one more thing left to do. In React, props can change over time. For example, the <Chosen> component can get different children if parent component's state changes. This means that at integration points it is important that we manually update the DOM in response to prop updates, since we no longer let React manage the DOM for us.
+
+Chosen's documentation suggests that we can use jQuery trigger() API to notify it about changes to the original DOM element. We will let React take care of updating this.props.children inside <select>, but we will also add a componentDidUpdate() lifecycle hook that notifies Chosen about changes in the children list:
+componentDidUpdate(prevProps) {
+ if (prevProps.children !== this.props.children) {
+ this.$el.trigger("chosen:updated");
+ }
+}
+
+This way, Chosen will know to update its DOM element when the <select> children managed by React change.
+
+The complete implementation of the Chosen component looks like this:
+class Chosen extends React.Component {
+ componentDidMount() {
+ this.$el = $(this.el);
+ this.$el.chosen();
+
+ this.handleChange = this.handleChange.bind(this);
+ this.$el.on('change', this.handleChange);
+ }
+
+ componentDidUpdate(prevProps) {
+ if (prevProps.children !== this.props.children) {
+ this.$el.trigger("chosen:updated");
+ }
+ }
+
+ componentWillUnmount() {
+ this.$el.off('change', this.handleChange);
+ this.$el.chosen('destroy');
+ }
+
+ handleChange(e) {
+ this.props.onChange(e.target.value);
+ }
+
+ render() {
+ return (
+ <div>
+ <select className="Chosen-select" ref={el => this.el = el}>
+ {this.props.children}
+ </select>
+ </div>
+ );
+ }
+}
+
+
+
+Integrating with Other View Libraries
+
+React can be embedded into other applications thanks to the flexibility of ReactDOM.render().
+
+Although React is commonly used at startup to load a single root React component into the DOM, ReactDOM.render() can also be called multiple times for independent parts of the UI which can be as small as a button, or as large as an app.
+
+In fact, this is exactly how React is used at Facebook. This lets us write applications in React piece by piece, and combine it with our existing server-generated templates and other client-side code.
+
+Replacing String-Based Rendering with React
+
+A common pattern in older web applications is to describe chunks of the DOM as a string and insert it into the DOM like so: $el.html(htmlString). These points in a codebase are perfect for introducing React. Just rewrite the string based rendering as a React component.
+
+So the following jQuery implementation...
+$('#container').html('<button id="btn">Say Hello</button>');
+$('#btn').click(function() {
+ alert('Hello!');
+});
+
+...could be rewritten using a React component:
+function Button() {
+ return <button id="btn">Say Hello</button>;
+}
+
+ReactDOM.render(
+ <Button />,
+ document.getElementById('container'),
+ function() {
+ $('#btn').click(function() {
+ alert('Hello!');
+ });
+ }
+);
+
+From here you could start moving more logic into the component and begin adopting more common React practices. For example, in components it is best not to rely on IDs because the same component can be rendered multiple times. Instead, we will use the React event system and register the click handler directly on the React <button> element:
+function Button(props) {
+ return <button onClick={props.onClick}>Say Hello</button>;
+}
+
+function HelloButton() {
+ function handleClick() {
+ alert('Hello!');
+ }
+ return <Button onClick={handleClick} />;
+}
+
+ReactDOM.render(
+ <HelloButton />,
+ document.getElementById('container')
+);
+
+
+
+You can have as many such isolated components as you like, and use ReactDOM.render() to render them to different DOM containers. Gradually, as you convert more of your app to React, you will be able to combine them into larger components, and move some of the ReactDOM.render() calls up the hierarchy.
+
+Embedding React in a Backbone View
+
+Backbone views typically use HTML strings, or string-producing template functions, to create the content for their DOM elements. This process, too, can be replaced with rendering a React component.
+
+Below, we will create a Backbone view called ParagraphView. It will override Backbone's render() function to render a React <Paragraph> component into the DOM element provided by Backbone (this.el). Here, too, we are using ReactDOM.render():
+function Paragraph(props) {
+ return <p>{props.text}</p>;
+}
+
+const ParagraphView = Backbone.View.extend({
+ render() {
+ const text = this.model.get('text');
+ ReactDOM.render(<Paragraph text={text} />, this.el);
+ return this;
+ },
+ remove() {
+ ReactDOM.unmountComponentAtNode(this.el);
+ Backbone.View.prototype.remove.call(this);
+ }
+});
+
+
+
+It is important that we also call ReactDOM.unmountComponentAtNode() in the remove method so that React unregisters event handlers and other resources associated with the component tree when it is detached.
+
+When a component is removed from within a React tree, the cleanup is performed automatically, but because we are removing the entire tree by hand, we must call it this method.
+
+Integrating with Model Layers
+
+While it is generally recommended to use unidirectional data flow such as React state, Flux, or Redux, React components can use a model layer from other frameworks and libraries.
+
+Using Backbone Models in React Components
+
+The simplest way to consume Backbone models and collections from a React component is to listen to the various change events and manually force an update.
+
+Components responsible for rendering models would listen to 'change' events, while components responsible for rendering collections would listen for 'add' and 'remove' events. In both cases, call this.forceUpdate() to rerender the component with the new data.
+
+In the example below, the List component renders a Backbone collection, using the Item component to render individual items.
+class Item extends React.Component {
+ constructor(props) {
+ super(props);
+ this.handleChange = this.handleChange.bind(this);
+ }
+
+ handleChange() {
+ this.forceUpdate();
+ }
+
+ componentDidMount() {
+ this.props.model.on('change', this.handleChange);
+ }
+
+ componentWillUnmount() {
+ this.props.model.off('change', this.handleChange);
+ }
+
+ render() {
+ return <li>{this.props.model.get('text')}</li>;
+ }
+}
+
+class List extends React.Component {
+ constructor(props) {
+ super(props);
+ this.handleChange = this.handleChange();
+ }
+
+ handleChange() {
+ this.forceUpdate();
+ }
+
+ componentDidMount() {
+ this.props.collection.on('add', 'remove', this.handleChange);
+ }
+
+ componentWillUnmount() {
+ this.props.collection.off('add', 'remove', this.handleChange);
+ }
+
+ render() {
+ return (
+ <ul>
+ {this.props.collection.map(model => (
+ <Item key={model.cid} model={model} />
+ ))}
+ </ul>
+ );
+ }
+}
+
+
+
+Extracting Data from Backbone Models
+
+The approach above requires your React components to be aware of the Backbone models and collections. If you later plan to migrate to another data management solution, you might want to concentrate the knowledge about Backbone in as few parts of the code as possible.
+
+One solution to this is to extract the model's attributes as plain data whenever it changes, and keep this logic in a single place. The following is a higher-order component that extracts all attributes of a Backbone model into state, passing the data to the wrapped component.
+
+This way, only the higher-order component needs to know about Backbone model internals, and most components in the app can stay agnostic of Backbone.
+
+In the example below, we will make a copy of the model's attributes to form the initial state. We subscribe to the change event (and unsubscribe on unmounting), and when it happens, we update the state with the model's current attributes. Finally, we make sure that if the model prop itself changes, we don't forget to unsubscribe from the old model, and subscribe to the new one.
+
+Note that this example is not meant to be exhaustive with regards to working with Backbone, but it should give you an idea for how to approach this in a generic way:
+function connectToBackboneModel(WrappedComponent) {
+ return class BackboneComponent extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = Object.assign({}, props.model.attributes);
+ this.handleChange = this.handleChange.bind(this);
+ }
+
+ componentDidMount() {
+ this.props.model.on('change', this.handleChange);
+ }
+
+ componentWillReceiveProps(nextProps) {
+ this.setState(Object.assign({}, nextProps.model.attributes));
+ if (nextProps.model !== this.props.model) {
+ this.props.model.off('change', this.handleChange);
+ nextProps.model.on('change', this.handleChange);
+ }
+ }
+
+ componentWillUnmount() {
+ this.props.model.off('change', this.handleChange);
+ }
+
+ handleChange(model) {
+ this.setState(model.changedAttributes());
+ }
+
+ render() {
+ const propsExceptModel = Object.assign({}, this.props);
+ delete propsExceptModel.model;
+ return <WrappedComponent {...propsExceptModel} {...this.state} />;
+ }
+ }
+}
+
+To demonstrate how to use it, we will connect a NameInput React component to a Backbone model, and update its firstName attribute every time the input changes:
+function NameInput(props) {
+ return (
+ <p>
+ <input value={props.firstName} onChange={props.handleChange} />
+ <br />
+ My name is {props.firstName}.
+ </p>
+ );
+}
+
+const BackboneNameInput = connectToBackboneModel(NameInput);
+
+function Example(props) {
+ function handleChange(e) {
+ model.set('firstName', e.target.value);
+ }
+
+ return (
+ <BackboneNameInput
+ model={props.model}
+ handleChange={handleChange}
+ />
+ );
+}
+
+const model = new Backbone.Model({ firstName: 'Frodo' });
+ReactDOM.render(
+ <Example model={model} />,
+ document.getElementById('root')
+);
+
+
+
+This technique is not limited to Backbone. You can use React with any model library by subscribing to its changes in the lifecycle hooks and, optionally, copying the data into the local React state.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/introducing-jsx.html b/docs/introducing-jsx.html
index f61a5031cb..9a9bb6e3dd 100644
--- a/docs/introducing-jsx.html
+++ b/docs/introducing-jsx.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -299,6 +299,11 @@
+
+ Typechecking With PropTypes
+
+
+
Refs and the DOM
@@ -344,6 +349,11 @@
+
+ Integrating with Other Libraries
+
+
+
diff --git a/docs/jsx-in-depth.html b/docs/jsx-in-depth.html
index bb5b9ce310..3b565b40c9 100644
--- a/docs/jsx-in-depth.html
+++ b/docs/jsx-in-depth.html
@@ -27,18 +27,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -121,7 +121,7 @@
return <CustomButton color="red" />;
}
-If you don't use a JavaScript bundler and added React as a script tag, it is already in scope as a React global.
If you don't use a JavaScript bundler and loaded React from a <script> tag, it is already in scope as the React global.
You can learn more about conditional rendering and loops in the corresponding sections.
+You can pass a string literal as a prop. These two JSX expressions are equivalent:
@@ -489,6 +491,11 @@ +React is the entry point to the React library. If you use React as a script tag, these top-level APIs are available on the React global. If you use ES6 with npm, you can write import React from 'react'. If you use ES5 with npm, you can write var React = require('react').
React is the entry point to the React library. If you load React from a <script> tag, these top-level APIs are available on the React global. If you use ES6 with npm, you can write import React from 'react'. If you use ES5 with npm, you can write var React = require('react').
If you use React as a script tag, these top-level APIs are available on the ReactDOMServer global. If you use ES6 with npm, you can write import ReactDOMServer from 'react-dom/server'. If you use ES5 with npm, you can write var ReactDOMServer = require('react-dom/server').
If you load React from a <script> tag, these top-level APIs are available on the ReactDOMServer global. If you use ES6 with npm, you can write import ReactDOMServer from 'react-dom/server'. If you use ES5 with npm, you can write var ReactDOMServer = require('react-dom/server').
If you use React as a script tag, these top-level APIs are available on the ReactDOM global. If you use ES6 with npm, you can write import ReactDOM from 'react-dom'. If you use ES5 with npm, you can write var ReactDOM = require('react-dom').
If you load React from a <script> tag, these top-level APIs are available on the ReactDOM global. If you use ES6 with npm, you can write import ReactDOM from 'react-dom'. If you use ES5 with npm, you can write var ReactDOM = require('react-dom').
If you use this shorthand form for React.createElement, it can be almost as convenient to use React without JSX.
Alternatively, you can refer to community projects such as react-hyperscript and hyperscript-helpers which offer a terser syntax.
For example, instead of exposing open() and close() methods on a Dialog component, pass an isOpen prop to it.
Your first inclination may be to use refs to "make things happen" in your app. If this is the case, take a moment and think more critically about where state should be owned in the component hierarchy. Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. See the Lifting State Up guide for examples of this.
+React supports a special attribute that you can attach to any component. The ref attribute takes a callback function, and the callback will be executed immediately after the component is mounted or unmounted.
Your first inclination may be to use refs to "make things happen" in your app. If this is the case, take a moment and think more critically about where state should be owned in the component hierarchy. Often, it becomes clear that the proper place to "own" that state is at a higher level in the hierarchy. See the Lifting State Up guide for examples of this.
+In rare cases, you might want to have access to a child's DOM node from a parent component. This is generally not recommended because it breaks component encapsulation, but it can occasionally be useful for triggering focus or measuring the size or position of a child DOM node.
+ +While you could add a ref to to the child component, this is not an ideal solution, as you would only get a component instance rather than a DOM node. Additionally, this wouldn't work with functional components.
+ +Instead, in such cases we recommend exposing a special prop on the child. The child would take a function prop with an arbitrary name (e.g. inputRef) and attach it to the DOM node as a ref attribute. This lets the parent pass its ref callback to the child's DOM node through the component in the middle.
This works both for classes and for functional components.
+function CustomTextInput(props) {
+ return (
+ <div>
+ <input ref={props.inputRef} />
+ </div>
+ );
+}
+
+class Parent extends React.Component {
+ render() {
+ return (
+ <CustomTextInput
+ inputRef={el => this.inputElement = el}
+ />
+ );
+ }
+}
+In the example above, Parent passes its ref callback as an inputRef prop to the CustomTextInput, and the CustomTextInput passes the same function as a special ref attribute to the <input>. As a result, this.inputElement in Parent will be set to the DOM node corresponding to the <input> element in the CustomTextInput.
Note that the name of the inputRef prop in the above example has no special meaning, as it is a regular component prop. However, using the ref attribute on the <input> itself is important, as it tells React to attach a ref to its DOM node.
This works even though CustomTextInput is a functional component. Unlike the special ref attribute which can only be specified for DOM elements and for class components, there are no restrictions on regular component props like inputRef.
Another benefit of this pattern is that it works several components deep. For example, imagine Parent didn't need that DOM node, but a component that rendered Parent (let's call it Grandparent) needed access to it. Then we could let the Grandparent specify the inputRef prop to the Parent, and let Parent "forward" it to the CustomTextInput:
function CustomTextInput(props) {
+ return (
+ <div>
+ <input ref={props.inputRef} />
+ </div>
+ );
+}
+
+function Parent(props) {
+ return (
+ <div>
+ My input: <CustomTextInput inputRef={props.inputRef} />
+ </div>
+ );
+}
+
+
+class Grandparent extends React.Component {
+ render() {
+ return (
+ <Parent
+ inputRef={el => this.inputElement = el}
+ />
+ );
+ }
+}
+Here, the ref callback is first specified by Grandparent. It is passed to the Parent as a regular prop called inputRef, and the Parent passes it to the CustomTextInput as a prop too. Finally, the CustomTextInput reads the inputRef prop and attaches the passed function as a ref attribute to the <input>. As a result, this.inputElement in Grandparent will be set to the DOM node corresponding to the <input> element in the CustomTextInput.
All things considered, we advise against exposing DOM nodes whenever possible, but this can be a useful escape hatch. Note that this approach requires you to add some code to the child component. If you have absolutely no control over the child component implementation, your last option is to use findDOMNode(), but it is discouraged.
The render method returns a description of what you want to render, and then React takes that description and renders it to the screen. In particular, render returns a React element, which is a lightweight description of what to render. Most React developers use a special syntax called JSX which makes it easier to write these structures. The <div /> syntax is transformed at build time to React.createElement('div'). The example above is equivalent to:
return React.createElement('div', {className: 'shopping-list'},
- React.createElement('h1', ...),
- React.createElement('ul', ...)
+ React.createElement('h1', /* ... h1 children ... */),
+ React.createElement('ul', /* ... ul children ... */)
);
If you're curious, createElement() is described in more detail in the API reference, but we won't be using it directly in this tutorial. Instead, we will keep using JSX.
You can put any JavaScript expression within braces inside JSX. Each React element is a real JavaScript object that you can store in a variable or pass around your program.
The ShoppingList component only renders built-in DOM components, but you can compose custom React components just as easily, by writing <ShoppingList />. Each component is encapsulated so it can operate independently, which allows you to build complex UIs out of simple components.