From 7425ccff6fe2786f7398d64761e1b74e4e380f8b Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 24 Jan 2023 00:51:49 +0000 Subject: [PATCH] [Beta] Blog MVP (#5493) * Remove old blog entries * Blog MVP * TS --- beta/src/components/MDX/MDXComponents.tsx | 10 + .../blog/2013/06/02/jsfiddle-integration.md | 8 - beta/src/content/blog/2013/06/05/why-react.md | 88 --- .../blog/2013/06/12/community-roundup.md | 48 -- .../blog/2013/06/19/community-roundup-2.md | 73 -- .../content/blog/2013/06/21/react-v0-3-3.md | 20 - .../blog/2013/06/27/community-roundup-3.md | 90 --- .../07/02/react-v0-4-autobind-by-default.md | 51 -- .../blog/2013/07/03/community-roundup-4.md | 59 -- ...v0-4-prop-validation-and-default-values.md | 60 -- .../content/blog/2013/07/17/react-v0-4-0.md | 37 - .../blog/2013/07/23/community-roundup-5.md | 94 --- .../content/blog/2013/07/26/react-v0-4-1.md | 21 - .../30/use-react-and-jsx-in-ruby-on-rails.md | 47 -- .../blog/2013/08/05/community-roundup-6.md | 76 -- ...se-react-and-jsx-in-python-applications.md | 55 -- .../blog/2013/08/26/community-roundup-7.md | 73 -- .../blog/2013/09/24/community-roundup-8.md | 66 -- .../blog/2013/10/03/community-roundup-9.md | 95 --- .../content/blog/2013/10/16/react-v0.5.0.md | 50 -- .../content/blog/2013/10/29/react-v0-5-1.md | 23 - .../blog/2013/11/06/community-roundup-10.md | 122 --- .../blog/2013/11/18/community-roundup-11.md | 91 --- .../blog/2013/12/18/react-v0.5.2-v0.4.2.md | 21 - .../content/blog/2013/12/19/react-v0.8.0.md | 46 -- .../blog/2013/12/23/community-roundup-12.md | 98 --- .../blog/2013/12/30/community-roundup-13.md | 110 --- .../01/02/react-chrome-developer-tools.md | 18 - .../blog/2014/01/06/community-roundup-14.md | 85 --- .../blog/2014/02/05/community-roundup-15.md | 126 ---- .../blog/2014/02/15/community-roundup-16.md | 77 -- .../content/blog/2014/02/16/react-v0.9-rc1.md | 125 ---- .../src/content/blog/2014/02/20/react-v0.9.md | 137 ---- .../blog/2014/02/24/community-roundup-17.md | 90 --- .../blog/2014/03/14/community-roundup-18.md | 101 --- .../blog/2014/03/19/react-v0.10-rc1.md | 74 -- .../content/blog/2014/03/21/react-v0.10.md | 74 -- .../blog/2014/03/28/the-road-to-1.0.md | 56 -- beta/src/content/blog/2014/04/04/reactnet.md | 38 - beta/src/content/blog/2014/05/06/flux.md | 16 - .../05/29/one-year-of-open-source-react.md | 14 - .../blog/2014/06/27/community-roundup-19.md | 60 -- .../blog/2014/07/13/react-v0.11-rc1.md | 144 ---- .../content/blog/2014/07/17/react-v0.11.md | 163 ---- .../content/blog/2014/07/25/react-v0.11.1.md | 45 -- .../blog/2014/07/28/community-roundup-20.md | 110 --- .../07/30/flux-actions-and-the-dispatcher.md | 38 - .../blog/2014/08/03/community-roundup-21.md | 107 --- .../03/introducing-the-jsx-specification.md | 14 - .../blog/2014/09/12/community-round-up-22.md | 104 --- .../content/blog/2014/09/16/react-v0.11.2.md | 46 -- .../2014/09/24/testing-flux-applications.md | 312 -------- .../2014/10/14/introducing-react-elements.md | 217 ------ .../blog/2014/10/16/react-v0.12-rc1.md | 137 ---- .../blog/2014/10/17/community-roundup-23.md | 137 ---- .../content/blog/2014/10/27/react-js-conf.md | 14 - .../content/blog/2014/10/28/react-v0.12.md | 126 ---- .../blog/2014/11/24/react-js-conf-updates.md | 39 - .../blog/2014/11/25/community-roundup-24.md | 96 --- .../content/blog/2014/12/18/react-v0.12.2.md | 36 - .../19/react-js-conf-diversity-scholarship.md | 37 - .../blog/2015/01/27/react-v0.13.0-beta-1.md | 155 ---- .../2015/02/18/react-conf-roundup-2015.md | 274 ------- .../02/20/introducing-relay-and-graphql.md | 62 -- .../blog/2015/02/24/react-v0.13-rc1.md | 75 -- .../2015/02/24/streamlining-react-elements.md | 234 ------ .../blog/2015/03/03/react-v0.13-rc2.md | 60 -- .../blog/2015/03/04/community-roundup-25.md | 62 -- .../content/blog/2015/03/10/react-v0.13.md | 88 --- .../content/blog/2015/03/16/react-v0.13.1.md | 46 -- ...lding-the-facebook-news-feed-with-relay.md | 222 ------ .../2015/03/26/introducing-react-native.md | 16 - .../blog/2015/03/30/community-roundup-26.md | 72 -- .../blog/2015/04/17/react-native-v0.4.md | 24 - .../content/blog/2015/04/18/react-v0.13.2.md | 50 -- .../blog/2015/05/01/graphql-introduction.md | 101 --- .../content/blog/2015/05/08/react-v0.13.3.md | 42 -- .../05/22/react-native-release-process.md | 22 - ...deprecating-jstransform-and-react-tools.md | 30 - .../blog/2015/07/03/react-v0.14-beta-1.md | 75 -- .../2015/08/03/new-react-devtools-beta.md | 92 --- .../2015/08/11/relay-technical-preview.md | 35 - .../blog/2015/08/13/reacteurope-roundup.md | 61 -- .../2015/09/02/new-react-developer-tools.md | 26 - .../blog/2015/09/10/react-v0.14-rc1.md | 178 ----- .../blog/2015/09/14/community-roundup-27.md | 75 -- .../10/01/react-render-and-top-level-api.md | 131 ---- .../content/blog/2015/10/07/react-v0.14.md | 203 ----- .../10/19/reactiflux-is-moving-to-discord.md | 86 --- .../content/blog/2015/10/28/react-v0.14.1.md | 44 -- .../content/blog/2015/11/02/react-v0.14.2.md | 32 - .../content/blog/2015/11/18/react-v0.14.3.md | 44 -- ...eact-js-conf-2016-diversity-scholarship.md | 44 -- .../blog/2015/12/16/ismounted-antipattern.md | 79 -- ...react-components-elements-and-instances.md | 386 ---------- .../content/blog/2015/12/29/react-v0.14.4.md | 40 - .../A-implies-B-does-not-imply-B-implies-A.md | 57 -- .../2016/01/12/discontinuing-ie8-support.md | 10 - .../blog/2016/02/19/new-versioning-scheme.md | 60 -- .../content/blog/2016/03/07/react-v15-rc1.md | 91 --- .../content/blog/2016/03/16/react-v15-rc2.md | 32 - .../content/blog/2016/03/29/react-v0.14.8.md | 33 - beta/src/content/blog/2016/04/07/react-v15.md | 259 ------- .../content/blog/2016/04/08/react-v15.0.1.md | 36 - .../introducing-reacts-error-code-system.md | 18 - .../2016/07/13/mixins-considered-harmful.md | 594 --------------- .../22/create-apps-with-no-configuration.md | 164 ---- .../2016/08/05/relay-state-of-the-state.md | 81 -- .../blog/2016/09/28/our-first-50000-stars.md | 225 ------ .../content/blog/2016/11/16/react-v15.4.0.md | 174 ----- .../content/blog/2017/04/07/react-v15.5.0.md | 226 ------ .../05/18/whats-new-in-create-react-app.md | 104 --- .../content/blog/2017/06/13/react-v15.6.0.md | 95 --- .../2017/07/26/error-handling-in-react-16.md | 116 --- .../2017/09/08/dom-attributes-in-react-16.md | 187 ----- .../content/blog/2017/09/25/react-v15.6.2.md | 65 -- .../content/blog/2017/09/26/react-v16.0.md | 213 ------ .../11/28/react-v16.2.0-fragment-support.md | 333 --------- .../07/introducing-the-react-rfc-process.md | 40 - ...improving-the-repository-infrastructure.md | 389 ---------- .../2018/03/01/sneak-peek-beyond-react-16.md | 24 - .../2018/03/27/update-on-async-rendering.md | 700 ------------------ .../content/blog/2018/03/29/react-v-16-3.md | 148 ---- .../content/blog/2018/05/23/react-v-16-4.md | 149 ---- .../you-probably-dont-need-derived-state.md | 362 --------- .../content/blog/2018/08/01/react-v-16-4-2.md | 148 ---- .../09/10/introducing-the-react-profiler.md | 200 ----- .../blog/2018/10/01/create-react-app-v2.md | 94 --- .../content/blog/2018/10/23/react-v-16-6.md | 157 ---- .../blog/2018/11/13/react-conf-recap.md | 26 - .../blog/2018/11/27/react-16-roadmap.md | 202 ----- .../content/blog/2018/12/19/react-v-16-7.md | 75 -- .../content/blog/2019/02/06/react-v16.8.0.md | 207 ------ .../2019/02/23/is-react-translated-yet.md | 76 -- .../content/blog/2019/08/08/react-v16.9.0.md | 250 ------- .../blog/2019/08/15/new-react-devtools.md | 81 -- .../blog/2019/10/22/react-release-channels.md | 103 --- ...ences-with-concurrent-mode-and-suspense.md | 231 ------ .../content/blog/2020/02/26/react-v16.13.0.md | 215 ------ .../content/blog/2020/08/10/react-v17-rc.md | 364 --------- ...a-fetching-with-react-server-components.md | 33 + .../blog/2021/06/08/the-plan-for-react-18.md | 68 ++ .../blog/2021/12/17/react-conf-2021-recap.md | 157 ++++ .../blog/2022/03/08/react-18-upgrade-guide.md | 328 ++++++++ beta/src/content/blog/2022/03/29/react-v18.md | 338 +++++++++ ...-what-we-have-been-working-on-june-2022.md | 79 ++ beta/src/content/blog/index.md | 87 +++ beta/src/pages/[[...markdownPath]].js | 2 + beta/src/sidebarLearn.json | 32 +- 149 files changed, 1133 insertions(+), 15316 deletions(-) delete mode 100644 beta/src/content/blog/2013/06/02/jsfiddle-integration.md delete mode 100644 beta/src/content/blog/2013/06/05/why-react.md delete mode 100644 beta/src/content/blog/2013/06/12/community-roundup.md delete mode 100644 beta/src/content/blog/2013/06/19/community-roundup-2.md delete mode 100644 beta/src/content/blog/2013/06/21/react-v0-3-3.md delete mode 100644 beta/src/content/blog/2013/06/27/community-roundup-3.md delete mode 100644 beta/src/content/blog/2013/07/02/react-v0-4-autobind-by-default.md delete mode 100644 beta/src/content/blog/2013/07/03/community-roundup-4.md delete mode 100644 beta/src/content/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.md delete mode 100644 beta/src/content/blog/2013/07/17/react-v0-4-0.md delete mode 100644 beta/src/content/blog/2013/07/23/community-roundup-5.md delete mode 100644 beta/src/content/blog/2013/07/26/react-v0-4-1.md delete mode 100644 beta/src/content/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails.md delete mode 100644 beta/src/content/blog/2013/08/05/community-roundup-6.md delete mode 100644 beta/src/content/blog/2013/08/19/use-react-and-jsx-in-python-applications.md delete mode 100644 beta/src/content/blog/2013/08/26/community-roundup-7.md delete mode 100644 beta/src/content/blog/2013/09/24/community-roundup-8.md delete mode 100644 beta/src/content/blog/2013/10/03/community-roundup-9.md delete mode 100644 beta/src/content/blog/2013/10/16/react-v0.5.0.md delete mode 100644 beta/src/content/blog/2013/10/29/react-v0-5-1.md delete mode 100644 beta/src/content/blog/2013/11/06/community-roundup-10.md delete mode 100644 beta/src/content/blog/2013/11/18/community-roundup-11.md delete mode 100644 beta/src/content/blog/2013/12/18/react-v0.5.2-v0.4.2.md delete mode 100644 beta/src/content/blog/2013/12/19/react-v0.8.0.md delete mode 100644 beta/src/content/blog/2013/12/23/community-roundup-12.md delete mode 100644 beta/src/content/blog/2013/12/30/community-roundup-13.md delete mode 100644 beta/src/content/blog/2014/01/02/react-chrome-developer-tools.md delete mode 100644 beta/src/content/blog/2014/01/06/community-roundup-14.md delete mode 100644 beta/src/content/blog/2014/02/05/community-roundup-15.md delete mode 100644 beta/src/content/blog/2014/02/15/community-roundup-16.md delete mode 100644 beta/src/content/blog/2014/02/16/react-v0.9-rc1.md delete mode 100644 beta/src/content/blog/2014/02/20/react-v0.9.md delete mode 100644 beta/src/content/blog/2014/02/24/community-roundup-17.md delete mode 100644 beta/src/content/blog/2014/03/14/community-roundup-18.md delete mode 100644 beta/src/content/blog/2014/03/19/react-v0.10-rc1.md delete mode 100644 beta/src/content/blog/2014/03/21/react-v0.10.md delete mode 100644 beta/src/content/blog/2014/03/28/the-road-to-1.0.md delete mode 100644 beta/src/content/blog/2014/04/04/reactnet.md delete mode 100644 beta/src/content/blog/2014/05/06/flux.md delete mode 100644 beta/src/content/blog/2014/05/29/one-year-of-open-source-react.md delete mode 100644 beta/src/content/blog/2014/06/27/community-roundup-19.md delete mode 100644 beta/src/content/blog/2014/07/13/react-v0.11-rc1.md delete mode 100644 beta/src/content/blog/2014/07/17/react-v0.11.md delete mode 100644 beta/src/content/blog/2014/07/25/react-v0.11.1.md delete mode 100644 beta/src/content/blog/2014/07/28/community-roundup-20.md delete mode 100644 beta/src/content/blog/2014/07/30/flux-actions-and-the-dispatcher.md delete mode 100644 beta/src/content/blog/2014/08/03/community-roundup-21.md delete mode 100644 beta/src/content/blog/2014/09/03/introducing-the-jsx-specification.md delete mode 100644 beta/src/content/blog/2014/09/12/community-round-up-22.md delete mode 100644 beta/src/content/blog/2014/09/16/react-v0.11.2.md delete mode 100644 beta/src/content/blog/2014/09/24/testing-flux-applications.md delete mode 100644 beta/src/content/blog/2014/10/14/introducing-react-elements.md delete mode 100644 beta/src/content/blog/2014/10/16/react-v0.12-rc1.md delete mode 100644 beta/src/content/blog/2014/10/17/community-roundup-23.md delete mode 100644 beta/src/content/blog/2014/10/27/react-js-conf.md delete mode 100644 beta/src/content/blog/2014/10/28/react-v0.12.md delete mode 100644 beta/src/content/blog/2014/11/24/react-js-conf-updates.md delete mode 100644 beta/src/content/blog/2014/11/25/community-roundup-24.md delete mode 100644 beta/src/content/blog/2014/12/18/react-v0.12.2.md delete mode 100644 beta/src/content/blog/2014/12/19/react-js-conf-diversity-scholarship.md delete mode 100644 beta/src/content/blog/2015/01/27/react-v0.13.0-beta-1.md delete mode 100644 beta/src/content/blog/2015/02/18/react-conf-roundup-2015.md delete mode 100644 beta/src/content/blog/2015/02/20/introducing-relay-and-graphql.md delete mode 100644 beta/src/content/blog/2015/02/24/react-v0.13-rc1.md delete mode 100644 beta/src/content/blog/2015/02/24/streamlining-react-elements.md delete mode 100644 beta/src/content/blog/2015/03/03/react-v0.13-rc2.md delete mode 100644 beta/src/content/blog/2015/03/04/community-roundup-25.md delete mode 100644 beta/src/content/blog/2015/03/10/react-v0.13.md delete mode 100644 beta/src/content/blog/2015/03/16/react-v0.13.1.md delete mode 100644 beta/src/content/blog/2015/03/19/building-the-facebook-news-feed-with-relay.md delete mode 100644 beta/src/content/blog/2015/03/26/introducing-react-native.md delete mode 100644 beta/src/content/blog/2015/03/30/community-roundup-26.md delete mode 100644 beta/src/content/blog/2015/04/17/react-native-v0.4.md delete mode 100644 beta/src/content/blog/2015/04/18/react-v0.13.2.md delete mode 100644 beta/src/content/blog/2015/05/01/graphql-introduction.md delete mode 100644 beta/src/content/blog/2015/05/08/react-v0.13.3.md delete mode 100644 beta/src/content/blog/2015/05/22/react-native-release-process.md delete mode 100644 beta/src/content/blog/2015/06/12/deprecating-jstransform-and-react-tools.md delete mode 100644 beta/src/content/blog/2015/07/03/react-v0.14-beta-1.md delete mode 100644 beta/src/content/blog/2015/08/03/new-react-devtools-beta.md delete mode 100644 beta/src/content/blog/2015/08/11/relay-technical-preview.md delete mode 100644 beta/src/content/blog/2015/08/13/reacteurope-roundup.md delete mode 100644 beta/src/content/blog/2015/09/02/new-react-developer-tools.md delete mode 100644 beta/src/content/blog/2015/09/10/react-v0.14-rc1.md delete mode 100644 beta/src/content/blog/2015/09/14/community-roundup-27.md delete mode 100644 beta/src/content/blog/2015/10/01/react-render-and-top-level-api.md delete mode 100644 beta/src/content/blog/2015/10/07/react-v0.14.md delete mode 100644 beta/src/content/blog/2015/10/19/reactiflux-is-moving-to-discord.md delete mode 100644 beta/src/content/blog/2015/10/28/react-v0.14.1.md delete mode 100644 beta/src/content/blog/2015/11/02/react-v0.14.2.md delete mode 100644 beta/src/content/blog/2015/11/18/react-v0.14.3.md delete mode 100644 beta/src/content/blog/2015/12/04/react-js-conf-2016-diversity-scholarship.md delete mode 100644 beta/src/content/blog/2015/12/16/ismounted-antipattern.md delete mode 100644 beta/src/content/blog/2015/12/18/react-components-elements-and-instances.md delete mode 100644 beta/src/content/blog/2015/12/29/react-v0.14.4.md delete mode 100644 beta/src/content/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.md delete mode 100644 beta/src/content/blog/2016/01/12/discontinuing-ie8-support.md delete mode 100644 beta/src/content/blog/2016/02/19/new-versioning-scheme.md delete mode 100644 beta/src/content/blog/2016/03/07/react-v15-rc1.md delete mode 100644 beta/src/content/blog/2016/03/16/react-v15-rc2.md delete mode 100644 beta/src/content/blog/2016/03/29/react-v0.14.8.md delete mode 100644 beta/src/content/blog/2016/04/07/react-v15.md delete mode 100644 beta/src/content/blog/2016/04/08/react-v15.0.1.md delete mode 100644 beta/src/content/blog/2016/07/11/introducing-reacts-error-code-system.md delete mode 100644 beta/src/content/blog/2016/07/13/mixins-considered-harmful.md delete mode 100644 beta/src/content/blog/2016/07/22/create-apps-with-no-configuration.md delete mode 100644 beta/src/content/blog/2016/08/05/relay-state-of-the-state.md delete mode 100644 beta/src/content/blog/2016/09/28/our-first-50000-stars.md delete mode 100644 beta/src/content/blog/2016/11/16/react-v15.4.0.md delete mode 100644 beta/src/content/blog/2017/04/07/react-v15.5.0.md delete mode 100644 beta/src/content/blog/2017/05/18/whats-new-in-create-react-app.md delete mode 100644 beta/src/content/blog/2017/06/13/react-v15.6.0.md delete mode 100644 beta/src/content/blog/2017/07/26/error-handling-in-react-16.md delete mode 100644 beta/src/content/blog/2017/09/08/dom-attributes-in-react-16.md delete mode 100644 beta/src/content/blog/2017/09/25/react-v15.6.2.md delete mode 100644 beta/src/content/blog/2017/09/26/react-v16.0.md delete mode 100644 beta/src/content/blog/2017/11/28/react-v16.2.0-fragment-support.md delete mode 100644 beta/src/content/blog/2017/12/07/introducing-the-react-rfc-process.md delete mode 100644 beta/src/content/blog/2017/12/15/improving-the-repository-infrastructure.md delete mode 100644 beta/src/content/blog/2018/03/01/sneak-peek-beyond-react-16.md delete mode 100644 beta/src/content/blog/2018/03/27/update-on-async-rendering.md delete mode 100644 beta/src/content/blog/2018/03/29/react-v-16-3.md delete mode 100644 beta/src/content/blog/2018/05/23/react-v-16-4.md delete mode 100644 beta/src/content/blog/2018/06/07/you-probably-dont-need-derived-state.md delete mode 100644 beta/src/content/blog/2018/08/01/react-v-16-4-2.md delete mode 100644 beta/src/content/blog/2018/09/10/introducing-the-react-profiler.md delete mode 100644 beta/src/content/blog/2018/10/01/create-react-app-v2.md delete mode 100644 beta/src/content/blog/2018/10/23/react-v-16-6.md delete mode 100644 beta/src/content/blog/2018/11/13/react-conf-recap.md delete mode 100644 beta/src/content/blog/2018/11/27/react-16-roadmap.md delete mode 100644 beta/src/content/blog/2018/12/19/react-v-16-7.md delete mode 100644 beta/src/content/blog/2019/02/06/react-v16.8.0.md delete mode 100644 beta/src/content/blog/2019/02/23/is-react-translated-yet.md delete mode 100644 beta/src/content/blog/2019/08/08/react-v16.9.0.md delete mode 100644 beta/src/content/blog/2019/08/15/new-react-devtools.md delete mode 100644 beta/src/content/blog/2019/10/22/react-release-channels.md delete mode 100644 beta/src/content/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense.md delete mode 100644 beta/src/content/blog/2020/02/26/react-v16.13.0.md delete mode 100644 beta/src/content/blog/2020/08/10/react-v17-rc.md create mode 100644 beta/src/content/blog/2020/12/21/data-fetching-with-react-server-components.md create mode 100644 beta/src/content/blog/2021/06/08/the-plan-for-react-18.md create mode 100644 beta/src/content/blog/2021/12/17/react-conf-2021-recap.md create mode 100644 beta/src/content/blog/2022/03/08/react-18-upgrade-guide.md create mode 100644 beta/src/content/blog/2022/03/29/react-v18.md create mode 100644 beta/src/content/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.md create mode 100644 beta/src/content/blog/index.md diff --git a/beta/src/components/MDX/MDXComponents.tsx b/beta/src/components/MDX/MDXComponents.tsx index 195f89ed..6f951d6c 100644 --- a/beta/src/components/MDX/MDXComponents.tsx +++ b/beta/src/components/MDX/MDXComponents.tsx @@ -133,6 +133,15 @@ function LearnMore({ ); } +function ReadBlogPost({path}: {path: string}) { + return ( + + Read Post + + + ); +} + function Math({children}: {children: any}) { return (

React (by Facebook) is now available on JSFiddle. facebook.github.io/react/

— JSFiddle (@jsfiddle) June 2, 2013 diff --git a/beta/src/content/blog/2013/06/05/why-react.md b/beta/src/content/blog/2013/06/05/why-react.md deleted file mode 100644 index 7addc8a5..00000000 --- a/beta/src/content/blog/2013/06/05/why-react.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Why did we build React? -author: [petehunt] ---- - -There are a lot of JavaScript MVC frameworks out there. Why did we build React -and why would you want to use it? - -## React isn't an MVC framework. {/*react-isnt-an-mvc-framework*/} - -React is a library for building composable user interfaces. It encourages -the creation of reusable UI components which present data that changes over -time. - -## React doesn't use templates. {/*react-doesnt-use-templates*/} - -Traditionally, web application UIs are built using templates or HTML directives. -These templates dictate the full set of abstractions that you are allowed to use -to build your UI. - -React approaches building user interfaces differently by breaking them into -**components**. This means React uses a real, full featured programming language -to render views, which we see as an advantage over templates for a few reasons: - -- **JavaScript is a flexible, powerful programming language** with the ability - to build abstractions. This is incredibly important in large applications. -- By unifying your markup with its corresponding view logic, React can actually - make views **easier to extend and maintain**. -- By baking an understanding of markup and content into JavaScript, there's - **no manual string concatenation** and therefore less surface area for XSS - vulnerabilities. - -We've also created [JSX](/docs/jsx-in-depth.html), an optional syntax -extension, in case you prefer the readability of HTML to raw JavaScript. - -## Reactive updates are dead simple. {/*reactive-updates-are-dead-simple*/} - -React really shines when your data changes over time. - -In a traditional JavaScript application, you need to look at what data changed -and imperatively make changes to the DOM to keep it up-to-date. Even AngularJS, -which provides a declarative interface via directives and data binding [requires -a linking function to manually update DOM nodes](https://code.angularjs.org/1.0.8/docs/guide/directive#reasonsbehindthecompilelinkseparation). - -React takes a different approach. - -When your component is first initialized, the `render` method is called, -generating a lightweight representation of your view. From that representation, -a string of markup is produced, and injected into the document. When your data -changes, the `render` method is called again. In order to perform updates as -efficiently as possible, we diff the return value from the previous call to -`render` with the new one, and generate a minimal set of changes to be applied -to the DOM. - -> The data returned from `render` is neither a string nor a DOM node -- it's a -> lightweight description of what the DOM should look like. - -We call this process **reconciliation**. Check out -[this jsFiddle](http://jsfiddle.net/2h6th4ju/) to see an example of -reconciliation in action. - -Because this re-render is so fast (around 1ms for TodoMVC), the developer -doesn't need to explicitly specify data bindings. We've found this approach -makes it easier to build apps. - -## HTML is just the beginning. {/*html-is-just-the-beginning*/} - -Because React has its own lightweight representation of the document, we can do -some pretty cool things with it: - -- Facebook has dynamic charts that render to `` instead of HTML. -- Instagram is a "single page" web app built entirely with React and - `Backbone.Router`. Designers regularly contribute React code with JSX. -- We've built internal prototypes that run React apps in a web worker and use - React to drive **native iOS views** via an Objective-C bridge. -- You can run React - [on the server](https://github.com/petehunt/react-server-rendering-example) - for SEO, performance, code sharing and overall flexibility. -- Events behave in a consistent, standards-compliant way in all browsers - (including IE8) and automatically use - [event delegation](http://davidwalsh.name/event-delegate). - -Head on over to [https://reactjs.org](https://reactjs.org) to check out what we have -built. Our documentation is geared towards building apps with the framework, -but if you are interested in the nuts and bolts -[get in touch](/support.html) with us! - -Thanks for reading! diff --git a/beta/src/content/blog/2013/06/12/community-roundup.md b/beta/src/content/blog/2013/06/12/community-roundup.md deleted file mode 100644 index 2b5a1c7b..00000000 --- a/beta/src/content/blog/2013/06/12/community-roundup.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: 'Community Round-up #1' -author: [vjeux] ---- - -React was open sourced two weeks ago and it's time for a little round-up of what has been going on. - -## Khan Academy Question Editor {/*khan-academy-question-editor*/} - -It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outside of Facebook and Instagram to push React code to production. We are very grateful for her contributions in form of pull requests, bug reports and presence on IRC ([#reactjs on Freenode](irc://chat.freenode.net/reactjs)). Sophie wrote about her experience using React: - -> I just rewrote a 2000-line project in React and have now made a handful of pull requests to React. Everything about React I've seen so far seems really well thought-out and I'm proud to be the first non-FB/IG production user of React. -> -> The project that I rewrote in React (and am continuing to improve) is the Khan Academy question editor which content creators can use to enter questions and hints that will be presented to students: -> ->
-> -> [Read the full post...](http://sophiebits.com/2013/06/09/using-react-to-speed-up-khan-academy.html) - -## Pimp my Backbone.View (by replacing it with React) {/*pimp-my-backboneview-by-replacing-it-with-react*/} - -[Paul Seiffert](https://blog.mayflower.de/) wrote a blog post that explains how to integrate React into Backbone applications. - -> React has some interesting concepts for JavaScript view objects that can be used to eliminate this one big problem I have with Backbone.js. -> -> As in most MVC implementations (although React is probably just a VC implementation), a view is one portion of the screen that is managed by a controlling object. This object is responsible for deciding when to re-render the view and how to react to user input. With React, these view-controllers objects are called components. A component knows how to render its view and how to handle to the user's interaction with it. -> -> The interesting thing is that React is figuring out by itself when to re-render a view and how to do this in the most efficient way. -> -> [Read the full post...](https://blog.mayflower.de/3937-Backbone-React.html) - -## Using facebook's React with require.js {/*using-facebooks-react-with-requirejs*/} - -[Mario Mueller](http://blog.xenji.com/) wrote a menu component in React and was able to easily integrate it with require.js, EventEmitter2 and bower. - -> I recently stumbled upon facebook's React library, which is a JavaScript library for building reusable frontend components. Even if this lib is only at version 0.3.x it behaves very stable, it is fast and is fun to code. I'm a big fan of require.js, so I tried to use React within the require.js eco system. It was not as hard as expected and here are some examples and some thoughts about it. -> -> [Read the full post...](http://blog.xenji.com/2013/06/facebooks-react-require-js.html) - -## Origins of React {/*origins-of-react*/} - -[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora: - -> React isn't quite like any other popular JavaScript libraries, and it solves a very specific problem: complex UI rendering. It's also intended to be used along side many other popular libraries. For example, React works well with Backbone.js, amongst many others. -> -> React was born out of frustrations with the common pattern of writing two-way data bindings in complex MVC apps. React is an implementation of one-way data bindings. -> -> [Read the full post...](https://www.quora.com/React-JS-Library/How-is-Facebooks-React-JavaScript-library/answer/Lee-Byron?srid=3DcX) diff --git a/beta/src/content/blog/2013/06/19/community-roundup-2.md b/beta/src/content/blog/2013/06/19/community-roundup-2.md deleted file mode 100644 index 042aba36..00000000 --- a/beta/src/content/blog/2013/06/19/community-roundup-2.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: 'Community Round-up #2' -author: [vjeux] ---- - -Since the launch we have received a lot of feedback and are actively working on React 0.4. In the meantime, here are the highlights of this week. - -## Some quick thoughts on React {/*some-quick-thoughts-on-react*/} - -[Andrew Greig](http://www.andrewgreig.com/) made a blog post that gives a high level description of what React is. - -> I have been using Facebook's recently released JavaScript framework called React.js for the last few days and have managed to obtain a rather high level understanding of how it works and formed a good perspective on how it fits in to the entire javascript framework ecosystem. -> -> Basically, React is not an MVC framework. It is not a replacement for Backbone or Knockout or Angular, instead it is designed to work with existing frameworks and help extend their functionality. -> -> It is designed for building big UIs. The type where you have lots of reusable components that are handling events and presenting and changing some backend data. In a traditional MVC app, React fulfils the role of the View. So you would still need to handle the Model and Controller on your own. -> -> I found the best way to utilise React was to pair it with Backbone, with React replacing the Backbone View, or to write your own Model/Data object and have React communicate with that. -> -> [Read the full post...](http://www.andrewgreig.com/637/) - -## React and Socket.IO Chat Application {/*react-and-socketio-chat-application*/} - -[Danial Khosravi](https://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO. - -> A week ago I was playing with AngularJS and [this little chat application](https://github.com/btford/angular-socket-io-im) which uses socket.io and nodejs for realtime communication. Yesterday I saw a post about ReactJS in [EchoJS](http://www.echojs.com/) and started playing with this UI library. After playing a bit with React, I decided to write and chat application using React and I used Bran Ford's Backend for server side of this little app. -> ->
-> -> [Read the full post...](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/) - -## React and Other Frameworks {/*react-and-other-frameworks*/} - -[Pete Hunt](http://www.petehunt.net/blog/) wrote an answer on Quora comparing React and Angular directives. At the end, he explains how you can make an Angular directive that is in fact being rendered with React. - -> To set the record straight: React components are far more powerful than Angular templates; they should be compared with Angular's directives instead. So I took the first Google hit for "AngularJS directive tutorial" (AngularJS Directives Tutorial - Fundoo Solutions), rewrote it in React and compared them. [...] -> -> We've designed React from the beginning to work well with other libraries. Angular is no exception. Let's take the original Angular example and use React to implement the fundoo-rating directive. -> -> [Read the full post...](https://www.quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look) - -In the same vein, [Markov Twain](https://twitter.com/markov_twain/status/345702941845499906) re-implemented the examples on the front-page [with Ember](http://jsbin.com/azihiw/2/edit) and [Vlad Yazhbin](https://twitter.com/vla) re-implemented the tutorial [with Angular](http://jsfiddle.net/vla/Cdrse/). - -## Web Components: React & x-tags {/*web-components-react--x-tags*/} - -Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.vjeux.com/) wrote a proof of concept that shows how to implement them using React. - -> Using [x-tags](http://www.x-tags.org/) from Mozilla, we can write custom tags within the DOM. This is a great opportunity to be able to write reusable components without being tied to a particular library. I wrote [x-react](https://github.com/vjeux/react-xtags/) to have them being rendered in React. -> ->
-> -> [Read the full post...](http://blog.vjeux.com/2013/javascript/custom-components-react-x-tags.html) - -## React TodoMVC Example {/*react-todomvc-example*/} - -[TodoMVC.com](http://todomvc.com/) is a website that collects various implementations of the same basic Todo app. [Pete Hunt](http://www.petehunt.net/blog/) wrote an idiomatic React version. - -> Developers these days are spoiled with choice when it comes to selecting an MV\* framework for structuring and organizing their JavaScript web apps. -> -> To help solve this problem, we created TodoMVC - a project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today. -> ->
-> -> [Read the source code...](https://github.com/tastejs/todomvc/tree/gh-pages/labs/architecture-examples/react) - -## JSX is not HTML {/*jsx-is-not-html*/} - -Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences: - -- [Whitespace removal](/docs/jsx-is-not-html.html) -- [HTML Entities](/docs/jsx-is-not-html.html) -- [Comments](/docs/jsx-is-not-html.html) -- [Custom HTML Attributes](/docs/jsx-is-not-html.html) diff --git a/beta/src/content/blog/2013/06/21/react-v0-3-3.md b/beta/src/content/blog/2013/06/21/react-v0-3-3.md deleted file mode 100644 index bc54ba96..00000000 --- a/beta/src/content/blog/2013/06/21/react-v0-3-3.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: 'React v0.3.3' -author: [zpao] ---- - -We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use. - -## react-tools {/*react-tools*/} - -- Upgrade Commoner so `require` statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of `bin/jsx`. -- Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache. -- Freeze our esprima dependency. - -## React {/*react*/} - -- Allow reusing the same DOM node to render different components. e.g. `React.renderComponent(
, domNode); React.renderComponent(, domNode);` will work now. - -## JSXTransformer {/*jsxtransformer*/} - -- Improved the in-browser transformer so that transformed scripts will execute in the expected scope. The allows components to be defined and used from separate files. diff --git a/beta/src/content/blog/2013/06/27/community-roundup-3.md b/beta/src/content/blog/2013/06/27/community-roundup-3.md deleted file mode 100644 index 32d71bea..00000000 --- a/beta/src/content/blog/2013/06/27/community-roundup-3.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: 'Community Round-up #3' -author: [vjeux] ---- - -The highlight of this week is that an interaction-heavy app has been ported to React. React components are solving issues they had with nested views. - -## Moving From Backbone To React {/*moving-from-backbone-to-react*/} - -[Clay Allsopp](https://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React. - -> [](http://usepropeller.com/blog/posts/from-backbone-to-react/)Subviews involve a lot of easy-to-forget boilerplate that Backbone (by design) doesn't automate. Libraries like Backbone.Marionette offer more abstractions to make view nesting easier, but they're all limited by the fact that Backbone delegates how and went view-document attachment occurs to the application code. -> -> React, on the other hand, manages the DOM and only exposes real nodes at select points in its API. The "elements" you code in React are actually objects which wrap DOM nodes, not the actual objects which get inserted into the DOM. Internally, React converts those abstractions into actual DOMElements and fills out the document accordingly. [...] -> -> We moved about 20 different Backbone view classes to React over the past few weeks, including the live-preview pane that you see in our little iOS demo. Most importantly, it's allowed us to put energy into making each component work great on its own, instead of spending extra cycles to ensure they function in unison. For that reason, we think React is a more scalable way to build view-intensive apps than Backbone alone, and it doesn't require you to drop-everything-and-refactor like a move to Ember or Angular would demand. -> -> [Read the full post...](http://usepropeller.com/blog/posts/from-backbone-to-react/) - -## Grunt Task for JSX {/*grunt-task-for-jsx*/} - -[Eric Clemmons](https://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your JavaScript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together. - -> Grunt task for compiling Facebook React's .jsx templates into .js -> -> ```javascript -> grunt.initConfig({ -> react: { -> app: { -> options: { extension: 'js' }, -> files: { 'path/to/output/dir': 'path/to/jsx/templates/dir' } -> ``` -> -> It also works great with `grunt-browserify`! -> -> ```javascript -> browserify: { -> options: { -> transform: [ require('grunt-react').browserify ] -> }, -> app: { -> src: 'path/to/source/main.js', -> dest: 'path/to/target/output.js' -> ``` -> -> [Check out the project ...](https://github.com/ericclemmons/grunt-react) - -## Backbone/Handlebars Nested Views {/*backbonehandlebars-nested-views*/} - -[Joel Burget](http://joelburget.com/) wrote a blog post talking about the way we would write React-like components in Backbone and Handlebars. - -> The problem here is that we're trying to manipulate a tree, but there's a textual layer we have to go through. Our views are represented as a tree - the subviews are children of CommentCollectionView - and they end up as part of a tree in the DOM. But there's a Handlebars layer in the middle (which deals in flat strings), so the hierarchy must be destructed and rebuilt when we render. -> -> What does it take to render a collection view? In the Backbone/Handlebars view of the world you have to render the template (with stubs), render each subview which replaces a stub, and keep a reference to each subview (or anything within the view that could change in the future). -> -> So while our view is conceptually hierarchical, due to the fact that it has to go through a flat textual representation, we need to do a lot of extra work to reassemble that structure after rendering. -> -> [Read the full post...](http://joelburget.com/react/) - -## JSRomandie Meetup {/*jsromandie-meetup*/} - -[Renault John Lecoultre](https://twitter.com/renajohn/) from [BugBuster](http://www.bugbuster.com) did a React introduction talk at a JS meetup called [JS Romandie](https://twitter.com/jsromandie) last week. - - - -## CoffeeScript integration {/*coffeescript-integration*/} - -[Vjeux](http://blog.vjeux.com/) used the fact that JSX is just a syntactic sugar on-top of regular JS to rewrite the React front-page examples in CoffeeScript. - -> Multiple people asked what's the story about JSX and CoffeeScript. There is no JSX pre-processor for CoffeeScript and I'm not aware of anyone working on it. Fortunately, CoffeeScript is pretty expressive and we can play around the syntax to come up with something that is usable. -> -> ```javascript -> {div, h3, textarea} = React.DOM -> (div {className: 'MarkdownEditor'}, [ -> (h3 {}, 'Input'), -> (textarea {onKeyUp: @handleKeyUp, ref: 'textarea'}, -> @state.value -> ) -> ]) -> ``` -> -> [Read the full post...](http://blog.vjeux.com/2013/javascript/react-coffeescript.html) - -## Tutorial in Plain JavaScript {/*tutorial-in-plain-javascript*/} - -We've seen a lot of people comparing React with various frameworks. [Ricardo Tomasi](http://ricardo.cc/) decided to re-implement the tutorial without any framework, just plain JavaScript. - -> Facebook & Instagram launched the React framework and an accompanying tutorial. Developer Vlad Yazhbin decided to rewrite that using AngularJS. The end result is pretty neat, but if you're like me you will not actually appreciate the HTML speaking for itself and doing all the hard work. So let's see what that looks like in plain javascript. -> -> [Read the full post...](http://ricardo.cc/2013/06/07/react-tutorial-rewritten-in-plain-javascript.html) diff --git a/beta/src/content/blog/2013/07/02/react-v0-4-autobind-by-default.md b/beta/src/content/blog/2013/07/02/react-v0-4-autobind-by-default.md deleted file mode 100644 index cec2abfb..00000000 --- a/beta/src/content/blog/2013/07/02/react-v0-4-autobind-by-default.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "New in React v0.4: Autobind by Default" -author: [zpao] ---- - -React v0.4 is very close to completion. As we finish it off, we'd like to share with you some of the major changes we've made since v0.3. This is the first of several posts we'll be making over the next week. - - -## What is React.autoBind? {/*what-is-reactautobind*/} - -If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](https://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be. - -Before we launched React, we would write this: - -```js {4} -React.createClass({ - onClick: function(event) {/* do something with this */}, - render: function() { - return