├── .nvmrc
├── .gitattributes
├── static
├── CNAME
├── check.png
├── favicon.ico
├── logo-og.png
├── external.png
├── _redirects
├── search.svg
├── js
│ ├── jsfiddle-integration-babel.js
│ └── jsfiddle-integration.js
└── html
│ └── single-file-example.html
├── src
├── pages
│ ├── robots.txt
│ ├── favicon.ico
│ ├── jsx-compiler.html.js
│ └── 404.js
├── images
│ └── oss_logo.png
├── components
│ ├── Flex
│ │ ├── index.js
│ │ └── Flex.js
│ ├── Header
│ │ ├── index.js
│ │ └── Header.js
│ ├── LayoutFooter
│ │ ├── index.js
│ │ ├── FooterLink.js
│ │ ├── FooterNav.js
│ │ └── ExternalFooterLink.js
│ ├── LayoutHeader
│ │ ├── index.js
│ │ ├── SearchSvg.js
│ │ └── HeaderLink.js
│ ├── Container
│ │ ├── index.js
│ │ └── Container.js
│ ├── ButtonLink
│ │ └── index.js
│ ├── CodeEditor
│ │ └── index.js
│ ├── ErrorDecoder
│ │ └── index.js
│ ├── MarkdownPage
│ │ └── index.js
│ ├── MarkdownHeader
│ │ ├── index.js
│ │ └── MarkdownHeader.js
│ ├── TitleAndMetaTags
│ │ ├── index.js
│ │ └── TitleAndMetaTags.js
│ └── StickyResponsiveSidebar
│ │ └── index.js
├── templates
│ ├── components
│ │ ├── Sidebar
│ │ │ └── index.js
│ │ ├── NavigationFooter
│ │ │ └── index.js
│ │ ├── MetaTitle
│ │ │ └── index.js
│ │ ├── ExternalLinkSvg
│ │ │ └── index.js
│ │ └── ChevronSvg
│ │ │ └── index.js
│ ├── docs.js
│ ├── community.js
│ ├── codepen-example.js
│ └── tutorial.js
├── utils
│ ├── createOgUrl.js
│ ├── slugify.js
│ ├── loadScript.js
│ ├── sectionList.js
│ ├── isItemActive.js
│ ├── toCommaSeparatedList.js
│ ├── mountCodeExample.js
│ └── findSectionForPath.js
├── icons
│ ├── logo-white.svg
│ └── logo.svg
├── site-constants.js
├── types.js
├── css
│ └── reset.css
└── html.js
├── .gitignore
├── flow-typed
├── graphql.js
├── slugify.js
├── gatsby-link.js
├── react-helmet.js
├── hex2rgba.js
├── polyfills.js
└── glamor.js
├── examples
├── jsx-simple-example.js
├── hello-world.js
├── rendering-elements
│ ├── render-an-element.js
│ └── update-rendered-element.js
├── es5-syntax-example.js
├── update-on-async-rendering
│ ├── definition-getsnapshotbeforeupdate.js
│ ├── definition-getderivedstatefromprops.js
│ ├── initializing-state-after.js
│ ├── initializing-state-before.js
│ ├── side-effects-when-props-change-after.js
│ ├── side-effects-when-props-change-before.js
│ ├── invoking-external-callbacks-after.js
│ ├── invoking-external-callbacks-before.js
│ ├── updating-state-from-props-before.js
│ ├── using-react-lifecycles-compat.js
│ ├── adding-event-listeners-before.js
│ ├── updating-state-from-props-after.js
│ ├── fetching-external-data-after.js
│ ├── fetching-external-data-before.js
│ ├── updating-external-data-when-props-change-before.js
│ ├── adding-event-listeners-create-subscription.js
│ ├── adding-event-listeners-after.js
│ ├── react-dom-properties-before-update-after.js
│ ├── react-dom-properties-before-update-before.js
│ └── updating-external-data-when-props-change-after.js
├── context
│ ├── theme-nested-context.js
│ ├── higher-order-component-usage.js
│ ├── reference-caveats-problem.js
│ ├── higher-order-component-before.js
│ ├── forwarding-refs-app.js
│ ├── theme-detailed-theme-context.js
│ ├── reference-caveats-solution.js
│ ├── theme-detailed-themed-button.js
│ ├── forwarding-refs-fancy-button.js
│ ├── higher-order-component.js
│ ├── motivation-problem.js
│ ├── theme-nested-toggler-button.js
│ ├── lifecycles.js
│ ├── motivation-solution.js
│ ├── app-nested.js
│ ├── multiple-contexts.js
│ └── theme-detailed-app.js
├── strict-mode
│ ├── side-effects-in-constructor.js
│ └── enabling-strict-mode.js
├── tutorial-expanded-version.js
├── components-and-props
│ ├── rendering-a-component.js
│ ├── composing-components.js
│ ├── extracting-components.js
│ └── extracting-components-continued.js
├── introducing-jsx.js
├── forwarding-refs
│ ├── fancy-button.js
│ ├── log-props-before.js
│ ├── fancy-button-ref.js
│ └── log-props-after.js
├── 16-3-release-blog-post
│ ├── hoc-theme-example.js
│ ├── create-ref-example.js
│ ├── context-example.js
│ ├── fancy-button-example.js
│ └── forward-ref-example.js
├── uncontrolled-components
│ └── input-type-file.js
├── react-component-reference
│ └── get-snapshot-before-update.js
└── reference-react-forward-ref.js
├── content
├── images
│ ├── noise.png
│ ├── search.png
│ ├── external.png
│ ├── logo_og.png
│ ├── oss_logo.png
│ ├── blog
│ │ ├── polarr.jpg
│ │ ├── snake.png
│ │ ├── unite.png
│ │ ├── xreact.png
│ │ ├── chatapp.png
│ │ ├── cra-pwa.png
│ │ ├── kendoui.png
│ │ ├── monkeys.gif
│ │ ├── ngreact.png
│ │ ├── quiztime.png
│ │ ├── react-php.png
│ │ ├── sweet-jsx.png
│ │ ├── todomvc.png
│ │ ├── tutsplus.png
│ │ ├── weather.png
│ │ ├── xoxo2013.png
│ │ ├── first-look.png
│ │ ├── flux-chart.png
│ │ ├── landoflisp.png
│ │ ├── lights-out.png
│ │ ├── om-backbone.png
│ │ ├── parse-react.jpg
│ │ ├── react-page.png
│ │ ├── reflux-flux.png
│ │ ├── turboreact.png
│ │ ├── animal-sounds.jpg
│ │ ├── devtools-full.gif
│ │ ├── dog-tutorial.png
│ │ ├── flux-diagram.png
│ │ ├── guess_filter.jpg
│ │ ├── jsx-compiler.png
│ │ ├── makona-editor.png
│ │ ├── modus-create.gif
│ │ ├── propeller-logo.png
│ │ ├── react-50k-mock.jpg
│ │ ├── react-svg-fbp.png
│ │ ├── skills-matter.png
│ │ ├── steve_reverse.gif
│ │ ├── versioning-1.png
│ │ ├── versioning-2.png
│ │ ├── versioning-3.png
│ │ ├── versioning-4.png
│ │ ├── versioning-5.png
│ │ ├── versioning-6.png
│ │ ├── cra-jest-search.gif
│ │ ├── devtools-search.gif
│ │ ├── genesis_skeleton.png
│ │ ├── gpu-cursor-move.gif
│ │ ├── property-finder.png
│ │ ├── react-50k-tshirt.jpg
│ │ ├── react-dev-tools.jpg
│ │ ├── react-diff-tree.png
│ │ ├── react-draggable.png
│ │ ├── react-hackathon.jpg
│ │ ├── versioning-poll.png
│ │ ├── cra-better-output.png
│ │ ├── cra-dynamic-import.gif
│ │ ├── cra-runtime-error.gif
│ │ ├── cra-update-exports.gif
│ │ ├── devtools-side-pane.gif
│ │ ├── devtools-tree-view.png
│ │ ├── khan-academy-editor.png
│ │ ├── markdown_refactor.png
│ │ ├── react-50k-mock-full.jpg
│ │ ├── tcomb-react-native.png
│ │ ├── wolfenstein_react.png
│ │ ├── react-browserify-gulp.jpg
│ │ ├── reactive-bookmarklet.png
│ │ ├── resistance-calculator.png
│ │ ├── hacker-news-react-native.png
│ │ ├── thinking-in-react-mock.png
│ │ ├── react-perf-chrome-timeline.png
│ │ ├── release-script-build-overview.png
│ │ ├── thinking-in-react-components.png
│ │ ├── relay-visual-architecture-tour.png
│ │ ├── relay-components
│ │ │ ├── relay-containers.png
│ │ │ ├── sample-newsfeed.png
│ │ │ ├── relay-architecture.png
│ │ │ └── relay-containers-data-flow.png
│ │ ├── release-script-build-confirmation.png
│ │ ├── release-script-publish-confirmation.png
│ │ ├── strict-mode-unsafe-lifecycles-warning.png
│ │ └── create-apps-with-no-configuration
│ │ │ ├── created-folder.png
│ │ │ ├── npm-run-build.png
│ │ │ ├── failed-to-compile.png
│ │ │ ├── compiled-successfully.png
│ │ │ └── compiled-with-warnings.png
│ ├── external_2x.png
│ ├── logo_small.png
│ ├── docs
│ │ ├── perf-dom.png
│ │ ├── perf-wasted.png
│ │ ├── codewinds-004.png
│ │ ├── devtools-dev.png
│ │ ├── devtools-prod.png
│ │ ├── keyboard-focus.png
│ │ ├── perf-exclusive.png
│ │ ├── perf-inclusive.png
│ │ ├── cdn-cors-header.png
│ │ ├── blur-popover-close.gif
│ │ ├── javascript-jabber.png
│ │ ├── granular-dom-updates.gif
│ │ ├── outerclick-with-mouse.gif
│ │ ├── react-devtools-state.gif
│ │ ├── outerclick-with-keyboard.gif
│ │ ├── should-component-update.png
│ │ ├── implementation-notes-tree.png
│ │ ├── thinking-in-react-tagtree.png
│ │ ├── error-boundaries-stack-trace.png
│ │ └── error-boundaries-stack-trace-line-numbers.png
│ ├── logo_small_2x.png
│ ├── logo_small_gray.png
│ ├── logo_small_gray_2x.png
│ └── tutorial
│ │ ├── devtools.png
│ │ ├── tictac-empty.png
│ │ └── tictac-numbers.png
├── 404.md
├── community
│ ├── examples.it-IT.md
│ ├── examples.ko-KR.md
│ ├── examples.zh-CN.md
│ ├── complementary-tools.md
│ ├── complementary-tools.it-IT.md
│ ├── complementary-tools.ko-KR.md
│ ├── complementary-tools.zh-CN.md
│ ├── tools-debugging.md
│ ├── tools-data-fetching.md
│ ├── conferences.ko-KR.md
│ ├── conferences.it-IT.md
│ ├── nav.yml
│ ├── external-resources.md
│ ├── conferences.zh-CN.md
│ ├── podcasts.md
│ ├── tools-testing.md
│ ├── articles.md
│ ├── tools-routing.md
│ ├── support.md
│ ├── tools-misc.md
│ ├── tools-comp-workbenches.md
│ └── tools-model-mgmt.md
├── home
│ ├── marketing
│ │ ├── component-based.md
│ │ ├── declarative.md
│ │ └── learn-once-write-anywhere.md
│ └── examples
│ │ ├── an-application.md
│ │ ├── a-stateful-component.md
│ │ ├── a-component-using-external-plugins.md
│ │ ├── a-simple-component.js
│ │ ├── a-simple-component.md
│ │ ├── a-stateful-component.js
│ │ ├── a-component-using-external-plugins.js
│ │ └── an-application.js
├── docs
│ ├── installation.md
│ ├── faq-build.md
│ ├── error-decoder.md
│ ├── forwarding-refs.md
│ ├── faq-internals.md
│ ├── reference-javascript-environment-requirements.md
│ ├── reference-react-dom-server.md
│ ├── cdn-links.md
│ ├── faq-styling.md
│ ├── hello-world.md
│ ├── web-components.md
│ ├── react-without-jsx.md
│ ├── addons-pure-render-mixin.md
│ ├── addons-shallow-renderer.md
│ └── faq-structure.md
├── warnings
│ ├── special-props.md
│ ├── invalid-aria-prop.md
│ ├── legacy-factories.md
│ └── refs-must-have-owner.md
├── blog
│ ├── 2013-06-02-jsfiddle-integration.md
│ ├── 2013-10-29-react-v0-5-1.md
│ ├── 2013-07-26-react-v0-4-1.md
│ ├── 2016-01-12-discontinuing-ie8-support.md
│ ├── 2013-06-21-react-v0-3-3.md
│ ├── 2014-09-03-introducing-the-jsx-specification.md
│ ├── 2014-10-27-react-js-conf.md
│ ├── 2018-03-01-sneak-peek-beyond-react-16.md
│ ├── 2015-03-26-introducing-react-native.md
│ ├── 2015-05-08-react-v0.13.3.md
│ ├── 2016-03-29-react-v0.14.8.md
│ ├── 2015-12-29-react-v0.14.4.md
│ ├── 2017-12-07-introducing-the-react-rfc-process.md
│ ├── 2014-04-04-reactnet.md
│ ├── 2015-03-16-react-v0.13.1.md
│ ├── 2015-10-28-react-v0.14.1.md
│ ├── 2013-12-18-react-v0.5.2-v0.4.2.md
│ └── 2015-09-02-new-react-developer-tools.md
└── versions.yml
├── .babelrc
├── plugins
├── gatsby-remark-use-jsx
│ ├── package.json
│ └── index.js
├── gatsby-source-react-error-codes
│ ├── package.json
│ └── gatsby-node.js
├── gatsby-transformer-authors-yaml
│ ├── package.json
│ └── gatsby-node.js
└── gatsby-transformer-home-example-code
│ ├── package.json
│ └── gatsby-node.js
├── .eslintignore
├── .prettierrc
├── .prettierrc.examples
├── .eslintrc
├── gatsby-node.js
├── .scripts
└── gatsby-deploy.sh
├── gatsby
├── modifyWebpackConfig.js
└── onCreatePage.js
├── .github
└── PULL_REQUEST_TEMPLATE.md
├── .flowconfig
├── .circleci
└── config.yml
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | 8.4
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/static/CNAME:
--------------------------------------------------------------------------------
1 | react.yubolun.com
2 |
--------------------------------------------------------------------------------
/src/pages/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .cache
2 | .DS_STORE
3 | .idea
4 | node_modules
5 | public
6 |
--------------------------------------------------------------------------------
/flow-typed/graphql.js:
--------------------------------------------------------------------------------
1 | declare function graphql(...params: any): any;
2 |
--------------------------------------------------------------------------------
/static/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/static/check.png
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/static/favicon.ico
--------------------------------------------------------------------------------
/static/logo-og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/static/logo-og.png
--------------------------------------------------------------------------------
/flow-typed/slugify.js:
--------------------------------------------------------------------------------
1 | declare module 'slugify' {
2 | declare module.exports: any;
3 | }
4 |
--------------------------------------------------------------------------------
/static/external.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/static/external.png
--------------------------------------------------------------------------------
/examples/jsx-simple-example.js:
--------------------------------------------------------------------------------
1 | function hello() {
2 | return
Hello world!
;
3 | }
4 |
--------------------------------------------------------------------------------
/src/images/oss_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/src/images/oss_logo.png
--------------------------------------------------------------------------------
/src/pages/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/src/pages/favicon.ico
--------------------------------------------------------------------------------
/content/images/noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/noise.png
--------------------------------------------------------------------------------
/content/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/search.png
--------------------------------------------------------------------------------
/flow-typed/gatsby-link.js:
--------------------------------------------------------------------------------
1 | declare module 'gatsby-link' {
2 | declare module.exports: any;
3 | }
4 |
--------------------------------------------------------------------------------
/flow-typed/react-helmet.js:
--------------------------------------------------------------------------------
1 | declare module 'react-helmet' {
2 | declare module.exports: any;
3 | }
4 |
--------------------------------------------------------------------------------
/content/images/external.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/external.png
--------------------------------------------------------------------------------
/content/images/logo_og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/logo_og.png
--------------------------------------------------------------------------------
/content/images/oss_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/oss_logo.png
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ['react', 'es2015', 'stage-1'],
3 | "plugins": ['add-module-exports']
4 | }
5 |
--------------------------------------------------------------------------------
/content/images/blog/polarr.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/polarr.jpg
--------------------------------------------------------------------------------
/content/images/blog/snake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/snake.png
--------------------------------------------------------------------------------
/content/images/blog/unite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/unite.png
--------------------------------------------------------------------------------
/content/images/blog/xreact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/xreact.png
--------------------------------------------------------------------------------
/content/images/external_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/external_2x.png
--------------------------------------------------------------------------------
/content/images/logo_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/logo_small.png
--------------------------------------------------------------------------------
/plugins/gatsby-remark-use-jsx/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-remark-use-jsx",
3 | "version": "0.0.1"
4 | }
--------------------------------------------------------------------------------
/content/images/blog/chatapp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/chatapp.png
--------------------------------------------------------------------------------
/content/images/blog/cra-pwa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-pwa.png
--------------------------------------------------------------------------------
/content/images/blog/kendoui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/kendoui.png
--------------------------------------------------------------------------------
/content/images/blog/monkeys.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/monkeys.gif
--------------------------------------------------------------------------------
/content/images/blog/ngreact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/ngreact.png
--------------------------------------------------------------------------------
/content/images/blog/quiztime.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/quiztime.png
--------------------------------------------------------------------------------
/content/images/blog/react-php.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-php.png
--------------------------------------------------------------------------------
/content/images/blog/sweet-jsx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/sweet-jsx.png
--------------------------------------------------------------------------------
/content/images/blog/todomvc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/todomvc.png
--------------------------------------------------------------------------------
/content/images/blog/tutsplus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/tutsplus.png
--------------------------------------------------------------------------------
/content/images/blog/weather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/weather.png
--------------------------------------------------------------------------------
/content/images/blog/xoxo2013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/xoxo2013.png
--------------------------------------------------------------------------------
/content/images/docs/perf-dom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/perf-dom.png
--------------------------------------------------------------------------------
/content/images/logo_small_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/logo_small_2x.png
--------------------------------------------------------------------------------
/content/images/blog/first-look.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/first-look.png
--------------------------------------------------------------------------------
/content/images/blog/flux-chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/flux-chart.png
--------------------------------------------------------------------------------
/content/images/blog/landoflisp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/landoflisp.png
--------------------------------------------------------------------------------
/content/images/blog/lights-out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/lights-out.png
--------------------------------------------------------------------------------
/content/images/blog/om-backbone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/om-backbone.png
--------------------------------------------------------------------------------
/content/images/blog/parse-react.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/parse-react.jpg
--------------------------------------------------------------------------------
/content/images/blog/react-page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-page.png
--------------------------------------------------------------------------------
/content/images/blog/reflux-flux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/reflux-flux.png
--------------------------------------------------------------------------------
/content/images/blog/turboreact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/turboreact.png
--------------------------------------------------------------------------------
/content/images/docs/perf-wasted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/perf-wasted.png
--------------------------------------------------------------------------------
/content/images/logo_small_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/logo_small_gray.png
--------------------------------------------------------------------------------
/examples/hello-world.js:
--------------------------------------------------------------------------------
1 | ReactDOM.render(
2 | Hello, world!
,
3 | document.getElementById('root')
4 | );
5 |
--------------------------------------------------------------------------------
/content/images/blog/animal-sounds.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/animal-sounds.jpg
--------------------------------------------------------------------------------
/content/images/blog/devtools-full.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/devtools-full.gif
--------------------------------------------------------------------------------
/content/images/blog/dog-tutorial.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/dog-tutorial.png
--------------------------------------------------------------------------------
/content/images/blog/flux-diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/flux-diagram.png
--------------------------------------------------------------------------------
/content/images/blog/guess_filter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/guess_filter.jpg
--------------------------------------------------------------------------------
/content/images/blog/jsx-compiler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/jsx-compiler.png
--------------------------------------------------------------------------------
/content/images/blog/makona-editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/makona-editor.png
--------------------------------------------------------------------------------
/content/images/blog/modus-create.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/modus-create.gif
--------------------------------------------------------------------------------
/content/images/blog/propeller-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/propeller-logo.png
--------------------------------------------------------------------------------
/content/images/blog/react-50k-mock.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-50k-mock.jpg
--------------------------------------------------------------------------------
/content/images/blog/react-svg-fbp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-svg-fbp.png
--------------------------------------------------------------------------------
/content/images/blog/skills-matter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/skills-matter.png
--------------------------------------------------------------------------------
/content/images/blog/steve_reverse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/steve_reverse.gif
--------------------------------------------------------------------------------
/content/images/blog/versioning-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-1.png
--------------------------------------------------------------------------------
/content/images/blog/versioning-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-2.png
--------------------------------------------------------------------------------
/content/images/blog/versioning-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-3.png
--------------------------------------------------------------------------------
/content/images/blog/versioning-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-4.png
--------------------------------------------------------------------------------
/content/images/blog/versioning-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-5.png
--------------------------------------------------------------------------------
/content/images/blog/versioning-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-6.png
--------------------------------------------------------------------------------
/content/images/docs/codewinds-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/codewinds-004.png
--------------------------------------------------------------------------------
/content/images/docs/devtools-dev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/devtools-dev.png
--------------------------------------------------------------------------------
/content/images/docs/devtools-prod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/devtools-prod.png
--------------------------------------------------------------------------------
/content/images/docs/keyboard-focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/keyboard-focus.png
--------------------------------------------------------------------------------
/content/images/docs/perf-exclusive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/perf-exclusive.png
--------------------------------------------------------------------------------
/content/images/docs/perf-inclusive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/perf-inclusive.png
--------------------------------------------------------------------------------
/content/images/logo_small_gray_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/logo_small_gray_2x.png
--------------------------------------------------------------------------------
/content/images/tutorial/devtools.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/tutorial/devtools.png
--------------------------------------------------------------------------------
/content/images/blog/cra-jest-search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-jest-search.gif
--------------------------------------------------------------------------------
/content/images/blog/devtools-search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/devtools-search.gif
--------------------------------------------------------------------------------
/content/images/blog/genesis_skeleton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/genesis_skeleton.png
--------------------------------------------------------------------------------
/content/images/blog/gpu-cursor-move.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/gpu-cursor-move.gif
--------------------------------------------------------------------------------
/content/images/blog/property-finder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/property-finder.png
--------------------------------------------------------------------------------
/content/images/blog/react-50k-tshirt.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-50k-tshirt.jpg
--------------------------------------------------------------------------------
/content/images/blog/react-dev-tools.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-dev-tools.jpg
--------------------------------------------------------------------------------
/content/images/blog/react-diff-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-diff-tree.png
--------------------------------------------------------------------------------
/content/images/blog/react-draggable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-draggable.png
--------------------------------------------------------------------------------
/content/images/blog/react-hackathon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-hackathon.jpg
--------------------------------------------------------------------------------
/content/images/blog/versioning-poll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/versioning-poll.png
--------------------------------------------------------------------------------
/content/images/docs/cdn-cors-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/cdn-cors-header.png
--------------------------------------------------------------------------------
/content/images/tutorial/tictac-empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/tutorial/tictac-empty.png
--------------------------------------------------------------------------------
/flow-typed/hex2rgba.js:
--------------------------------------------------------------------------------
1 | declare module 'hex2rgba' {
2 | declare module.exports: (hex: string, alpha?: number) => string;
3 | }
4 |
--------------------------------------------------------------------------------
/plugins/gatsby-source-react-error-codes/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-source-react-error-codes",
3 | "version": "0.0.1"
4 | }
--------------------------------------------------------------------------------
/plugins/gatsby-transformer-authors-yaml/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-transformer-authors-yaml",
3 | "version": "0.0.1"
4 | }
--------------------------------------------------------------------------------
/content/images/blog/cra-better-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-better-output.png
--------------------------------------------------------------------------------
/content/images/blog/cra-dynamic-import.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-dynamic-import.gif
--------------------------------------------------------------------------------
/content/images/blog/cra-runtime-error.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-runtime-error.gif
--------------------------------------------------------------------------------
/content/images/blog/cra-update-exports.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/cra-update-exports.gif
--------------------------------------------------------------------------------
/content/images/blog/devtools-side-pane.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/devtools-side-pane.gif
--------------------------------------------------------------------------------
/content/images/blog/devtools-tree-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/devtools-tree-view.png
--------------------------------------------------------------------------------
/content/images/blog/khan-academy-editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/khan-academy-editor.png
--------------------------------------------------------------------------------
/content/images/blog/markdown_refactor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/markdown_refactor.png
--------------------------------------------------------------------------------
/content/images/blog/react-50k-mock-full.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-50k-mock-full.jpg
--------------------------------------------------------------------------------
/content/images/blog/tcomb-react-native.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/tcomb-react-native.png
--------------------------------------------------------------------------------
/content/images/blog/wolfenstein_react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/wolfenstein_react.png
--------------------------------------------------------------------------------
/content/images/docs/blur-popover-close.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/blur-popover-close.gif
--------------------------------------------------------------------------------
/content/images/docs/javascript-jabber.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/javascript-jabber.png
--------------------------------------------------------------------------------
/content/images/tutorial/tictac-numbers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/tutorial/tictac-numbers.png
--------------------------------------------------------------------------------
/content/images/blog/react-browserify-gulp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-browserify-gulp.jpg
--------------------------------------------------------------------------------
/content/images/blog/reactive-bookmarklet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/reactive-bookmarklet.png
--------------------------------------------------------------------------------
/content/images/blog/resistance-calculator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/resistance-calculator.png
--------------------------------------------------------------------------------
/content/images/docs/granular-dom-updates.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/granular-dom-updates.gif
--------------------------------------------------------------------------------
/content/images/docs/outerclick-with-mouse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/outerclick-with-mouse.gif
--------------------------------------------------------------------------------
/content/images/docs/react-devtools-state.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/react-devtools-state.gif
--------------------------------------------------------------------------------
/plugins/gatsby-transformer-home-example-code/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-transformer-home-example-code",
3 | "version": "0.0.1"
4 | }
--------------------------------------------------------------------------------
/content/images/blog/hacker-news-react-native.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/hacker-news-react-native.png
--------------------------------------------------------------------------------
/content/images/blog/thinking-in-react-mock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/thinking-in-react-mock.png
--------------------------------------------------------------------------------
/content/images/docs/outerclick-with-keyboard.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/outerclick-with-keyboard.gif
--------------------------------------------------------------------------------
/content/images/docs/should-component-update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/should-component-update.png
--------------------------------------------------------------------------------
/content/images/blog/react-perf-chrome-timeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/react-perf-chrome-timeline.png
--------------------------------------------------------------------------------
/content/images/docs/implementation-notes-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/implementation-notes-tree.png
--------------------------------------------------------------------------------
/content/images/docs/thinking-in-react-tagtree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/thinking-in-react-tagtree.png
--------------------------------------------------------------------------------
/content/images/blog/release-script-build-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/release-script-build-overview.png
--------------------------------------------------------------------------------
/content/images/blog/thinking-in-react-components.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/thinking-in-react-components.png
--------------------------------------------------------------------------------
/content/images/docs/error-boundaries-stack-trace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/error-boundaries-stack-trace.png
--------------------------------------------------------------------------------
/examples/rendering-elements/render-an-element.js:
--------------------------------------------------------------------------------
1 | const element = Hello, world
;
2 | ReactDOM.render(element, document.getElementById('root'));
3 |
--------------------------------------------------------------------------------
/content/404.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: single
3 | title: Page Not Found
4 | permalink: 404.html
5 | ---
6 |
7 | 你似乎来到了没有文档存在的荒原...
8 |
9 | [点击这里返回文档主页](/)
10 |
--------------------------------------------------------------------------------
/content/images/blog/relay-visual-architecture-tour.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/relay-visual-architecture-tour.png
--------------------------------------------------------------------------------
/content/images/blog/relay-components/relay-containers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/relay-components/relay-containers.png
--------------------------------------------------------------------------------
/content/images/blog/relay-components/sample-newsfeed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/relay-components/sample-newsfeed.png
--------------------------------------------------------------------------------
/content/images/blog/release-script-build-confirmation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/release-script-build-confirmation.png
--------------------------------------------------------------------------------
/static/_redirects:
--------------------------------------------------------------------------------
1 | /html-jsx.html http://magic.reactjs.net/htmltojsx.htm 301
2 | /tips/controlled-input-null-value.html /docs/forms.html#controlled-input-null-value
--------------------------------------------------------------------------------
/content/images/blog/relay-components/relay-architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/relay-components/relay-architecture.png
--------------------------------------------------------------------------------
/content/images/blog/release-script-publish-confirmation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/release-script-publish-confirmation.png
--------------------------------------------------------------------------------
/examples/es5-syntax-example.js:
--------------------------------------------------------------------------------
1 | const element = Hello, world!
;
2 | const container = document.getElementById('root');
3 | ReactDOM.render(element, container);
4 |
--------------------------------------------------------------------------------
/content/community/examples.it-IT.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/examples-it-IT.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Examples
5 | ---
6 |
--------------------------------------------------------------------------------
/content/community/examples.ko-KR.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/examples-ko-KR.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Examples
5 | ---
6 |
--------------------------------------------------------------------------------
/content/community/examples.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/examples-zh-CN.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Examples
5 | ---
6 |
--------------------------------------------------------------------------------
/content/images/blog/strict-mode-unsafe-lifecycles-warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/strict-mode-unsafe-lifecycles-warning.png
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules/*
2 |
3 | # Ignore markdown files and examples
4 | content/*
5 |
6 | # Ignore built files
7 | public/*
8 |
9 | # Ignore examples
10 | examples/*
--------------------------------------------------------------------------------
/content/images/docs/error-boundaries-stack-trace-line-numbers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/docs/error-boundaries-stack-trace-line-numbers.png
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "bracketSpacing": false,
3 | "jsxBracketSameLine": true,
4 | "parser": "flow",
5 | "printWidth": 80,
6 | "singleQuote": true,
7 | "trailingComma": "all"
8 | }
--------------------------------------------------------------------------------
/content/images/blog/relay-components/relay-containers-data-flow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/relay-components/relay-containers-data-flow.png
--------------------------------------------------------------------------------
/.prettierrc.examples:
--------------------------------------------------------------------------------
1 | {
2 | "bracketSpacing": false,
3 | "jsxBracketSameLine": true,
4 | "parser": "flow",
5 | "printWidth": 40,
6 | "singleQuote": true,
7 | "trailingComma": "es5"
8 | }
--------------------------------------------------------------------------------
/content/community/complementary-tools.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/complementary-tools.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Complementary-Tools
5 | ---
6 |
--------------------------------------------------------------------------------
/content/images/blog/create-apps-with-no-configuration/created-folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/create-apps-with-no-configuration/created-folder.png
--------------------------------------------------------------------------------
/content/images/blog/create-apps-with-no-configuration/npm-run-build.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/create-apps-with-no-configuration/npm-run-build.png
--------------------------------------------------------------------------------
/content/images/blog/create-apps-with-no-configuration/failed-to-compile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/create-apps-with-no-configuration/failed-to-compile.png
--------------------------------------------------------------------------------
/examples/update-on-async-rendering/definition-getsnapshotbeforeupdate.js:
--------------------------------------------------------------------------------
1 | class Example extends React.Component {
2 | getSnapshotBeforeUpdate(prevProps, prevState) {
3 | // ...
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/Flex/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Flex from './Flex';
8 |
9 | export default Flex;
10 |
--------------------------------------------------------------------------------
/content/community/complementary-tools.it-IT.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/complementary-tools-it-IT.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Complementary-Tools
5 | ---
6 |
--------------------------------------------------------------------------------
/content/community/complementary-tools.ko-KR.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/complementary-tools-ko-KR.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Complementary-Tools
5 | ---
6 |
--------------------------------------------------------------------------------
/content/community/complementary-tools.zh-CN.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: docs/complementary-tools-zh-CN.html
3 | layout: redirect
4 | dest_url: https://github.com/facebook/react/wiki/Complementary-Tools
5 | ---
6 |
--------------------------------------------------------------------------------
/content/home/marketing/component-based.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 组件化
3 | order: 1
4 | ---
5 |
6 | 创建好拥有各自状态的组件,再由组件构成更加复杂的界面。
7 |
8 | 无需再用模版代码,通过使用JavaScript编写的组件你可以更好地传递数据,将应用状态和DOM拆分开来。
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/update-on-async-rendering/definition-getderivedstatefromprops.js:
--------------------------------------------------------------------------------
1 | class Example extends React.Component {
2 | static getDerivedStateFromProps(nextProps, prevState) {
3 | // ...
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/content/images/blog/create-apps-with-no-configuration/compiled-successfully.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/create-apps-with-no-configuration/compiled-successfully.png
--------------------------------------------------------------------------------
/content/images/blog/create-apps-with-no-configuration/compiled-with-warnings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discountry/react/HEAD/content/images/blog/create-apps-with-no-configuration/compiled-with-warnings.png
--------------------------------------------------------------------------------
/src/components/Header/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Header from './Header';
8 |
9 | export default Header;
10 |
--------------------------------------------------------------------------------
/content/home/examples/an-application.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 应用
3 | order: 2
4 | ---
5 |
6 | 使用 `props` 和 `state`, 我们可以创建一个简易的 Todo 应用。 下面这个示例中,我们使用 `state` 来保存现有的待办事项列表及用户的输入。 与此同时,我们也使用了内联的方法添加了事件处理函数,它们将通过事件代理被收集和调用。
7 |
--------------------------------------------------------------------------------
/content/home/marketing/declarative.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 声明式
3 | order: 0
4 | ---
5 |
6 | React 可以非常轻松地创建用户交互界面。为你应用的每一个状态设计简洁的视图,在数据改变时 React 也可以高效地更新渲染界面。
7 |
8 | 以声明式编写UI,可以让你的代码更加可靠,且方便调试。
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/LayoutFooter/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Footer from './Footer';
8 |
9 | export default Footer;
10 |
--------------------------------------------------------------------------------
/src/components/LayoutHeader/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Header from './Header';
8 |
9 | export default Header;
10 |
--------------------------------------------------------------------------------
/examples/context/theme-nested-context.js:
--------------------------------------------------------------------------------
1 | // 确保默认值按类型传递
2 | // createContext() 匹配的属性是 Consumers 所期望的
3 | export const ThemeContext = React.createContext({
4 | theme: themes.dark,
5 | toggleTheme: () => {},
6 | });
7 |
--------------------------------------------------------------------------------
/src/components/Container/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Container from './Container';
8 |
9 | export default Container;
10 |
--------------------------------------------------------------------------------
/src/components/ButtonLink/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import ButtonLink from './ButtonLink';
8 |
9 | export default ButtonLink;
10 |
--------------------------------------------------------------------------------
/src/components/CodeEditor/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import CodeEditor from './CodeEditor';
8 |
9 | export default CodeEditor;
10 |
--------------------------------------------------------------------------------
/src/templates/components/Sidebar/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import Sidebar from './Sidebar';
8 |
9 | export default Sidebar;
10 |
--------------------------------------------------------------------------------
/content/home/examples/a-stateful-component.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 有状态组件
3 | order: 1
4 | ---
5 |
6 | 除了使用外部传入的数据以外 (通过 `this.props` 访问传入数据), 组件还可以拥有其内部的状态数据 (通过 `this.state` 访问状态数据)。 当组件的状态数据改变时, 组件会调用 `render()` 方法重新渲染。
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/strict-mode/side-effects-in-constructor.js:
--------------------------------------------------------------------------------
1 | class TopLevelRoute extends React.Component {
2 | constructor(props) {
3 | super(props);
4 |
5 | SharedApplicationState.recordEvent('ExampleComponent');
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/tutorial-expanded-version.js:
--------------------------------------------------------------------------------
1 |
2 |
Shopping List for {props.name}
3 |
4 | - Instagram
5 | - WhatsApp
6 | - Oculus
7 |
8 |
;
9 |
--------------------------------------------------------------------------------
/src/components/ErrorDecoder/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import ErrorDecoder from './ErrorDecoder';
8 |
9 | export default ErrorDecoder;
10 |
--------------------------------------------------------------------------------
/src/components/MarkdownPage/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import MarkdownPage from './MarkdownPage';
8 |
9 | export default MarkdownPage;
10 |
--------------------------------------------------------------------------------
/src/components/MarkdownHeader/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2013-present, Facebook, Inc.
3 | *
4 | * @emails react-core
5 | */
6 |
7 | import MarkdownHeader from './MarkdownHeader';
8 |
9 | export default MarkdownHeader;
10 |
--------------------------------------------------------------------------------
/content/home/examples/a-component-using-external-plugins.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 在组件中使用第三方库
3 | order: 3
4 | ---
5 |
6 | React 的使用非常灵活,并且提供了可以调用其他第三方框架或库的接口。下面这个示例就使用了一个用来渲染 markdown 语法,名为 **remarkable** 的库。它可以实时转换渲染 `