dan
a7d2254e0d
Update more examples for 18 ( #4607 )
* Update more examples for 18
* blargh
3 years ago
Ricky
74246c13b9
React 18 ( #4499 )
* [18] ReactDOM reference to createRoot/hydrateRoot (#4340 )
* [18] ReactDOM reference to createRoot/hydrateRoot
* Update note about render and hydrate
* Match the warning text
* s/Render/render
* [18] Update ReactDOMClient docs (#4468 )
* [18] Update ReactDOMClient docs
* Remove ReactDOMClient where it's obvious
* Update browser message
* Update browser message note
* Update based on feedback
* Add react-dom/client docs
* [18] Upgrade homepage examples (#4469 )
* [18] Switch code samples to createRoot (#4470 )
* [18] Switch code samples to createRoot
* Feedback fixes
* Feedback updates
* [18] Use hydrateRoot and root.unmount. (#4473 )
* [18] Add docs for flushSync (#4474 )
* [18] Add flushSync to ReactDOM docs
* Seb feedback
* More Seb feedback
* [18] Bump version to 18 (#4478 )
* [18] Update browser requirements (#4476 )
* [18] Update browser requirements
* Update based on feedback
* [18] Add stubs for new API references (#4477 )
* [18] Add stubs for new API references
* Change order/grouping
* [18] Redirect outdated Concurrent Mode docs (#4481 )
* [18] Redirect outdated Concurrent Mode docs
* Use Vercel redirects instead
* [18] Update versions page (#4482 )
* [18] Update version page
* Fix prettier
* [18] Update React.lazy docs (#4483 )
* [18] Add docs for useSyncExternalStore (#4487 )
* [18] Add docs for useSyncExternalStore
* rm "optional"
* [18] Add docs for useInsertionEffect (#4486 )
* [18] Add docs for useId (#4488 )
* [18] Add docs for useId
* Update based on feedback
* Add Strict Effects to Strict Mode (#4362 )
* Add Strict Effects to Strict Mode
* Update with new thinking
* [18] Update docs for useEffect timing (#4498 )
* [18] Add docs for useDeferredValue (#4497 )
* [18] Update suspense docs for unexpected fallbacks (#4500 )
* [18] Update suspense docs for unexpected fallbacks
* Add inline code block
* Feedback fixes
* [18] Updated Suspense doc with behavior during SSR and Hydration (#4484 )
* update wording
* wording
* update events
* Update content/docs/reference-react.md
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
* add link to selective hydration
* remove some of the implementation details
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
* [18] renderToPipeableStream doc (#4485 )
* new streaming ssr api
* add readable stream
* code snippets
* Rename strict effects / unsafe effects to use the reusable state terminology (#4505 )
* Add draft of 18 release post
* Add links to speaker Twitter profiles
* [18] Update upgrade guide
* Fix typo in blog title
* [18] Blog - add note for react native
* [18] Add changelog info to blog posts
* Edit Suspense for data fetching section
* Update date
* [18] Add links
* Consistent title case
* Update link to merged RFC
* [18] Update APIs and links
* [18] Add start/useTransition docs (#4479 )
* [18] Add start/useTransition docs
* Updates based on feedback
* [18] Generate heading IDs
* Add note about Strict Mode
* Just frameworks
* Reorder, fix content
* Typos
* Clarify Suspense frameworks section
* Revert lost changes that happened when I undo-ed in my editor
Co-authored-by: salazarm <salazarm@users.noreply.github.com>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Co-authored-by: Sebastian Markbåge <sebastian@calyptus.eu>
Co-authored-by: Andrew Clark <git@andrewclark.io>
Co-authored-by: dan <dan.abramov@gmail.com>
3 years ago
Niklas P
49fd7d5f11
Update reference-caveats-solution.js ( #3609 )
As referenced in https://reactjs.org/docs/context.html update the example to use the naming conventions used across the page.
4 years ago
Charlie Stras
6ff9c4bd06
Fix incorrect highlighting in uncontrolled components example ( #2873 )
5 years ago
Fran Zekan
91ffdb0812
Upgrade to Node 12 LTS ( #2831 )
* Upgrade to node 12 LTS
* Run prettier
5 years ago
Ruslan Petrov
d58c947b1e
Update motivation-solution.js ( #1625 )
Removed unused props for clarity.
5 years ago
Ruslan Petrov
16647b39e6
Update reference-caveats-problem.js ( #1626 )
Added MyContext for clarity.
5 years ago
Sebastian Markbåge
896214b7d2
Document class contextType as the primary consuming mechanism ( #1283 )
* Document class contextType as the primary consuming mechanism
* Update context.md
6 years ago
Michał Gołębiowski-Owczarek
06a8850b2f
HTTPS-ify lots of URLs, update some to their newer homes ( #1157 )
This matters for user security.
I didn't touch blog posts & pages related to past conferences.
The `content/docs` could be HTTPS-ified as well but it contains lots of HTTP
links so maybe that'd be best done in a separate PR.
6 years ago
Alexander Nanberg
71b03486c0
Upgrade to Gatsby v2 ( #1104 )
* Upgrade to Gatsby v2
* Remove unnecessary polyfills since gatsby already provides them
* Move global styles to gatsby-browser
* Add fb comment and convert to cjs
* Revert to use pageQuery again
* Add back html.js
* Update dependencies
* Move TitleAndMetaTags
* Replace glamor/reset with normalize.css which fixes style order in prod
* Prettier formatting
* Remove unused types
* Remove old layout
* Fix versions link
* Update deps
* Update deps
* Remove hack since it's no longer needed
* Update dependencies
* Fix build error
* Fix prettier config resolution
* Update gatsby
* Remove custom onCreatePage logic
* Update dependencies
* Fix build
* Update dependencies
* prettier formatting
* update dependencies
* add custom babel config for flow
* upgrade dependencies
* update dependencies
* use stable gatsby release
6 years ago
Tanyoung Kim
83fd04aa81
Update example function name in Async blog post ( #1183 )
6 years ago
Nathan Quarles
392d5bfdcd
Update lifecycles.js ( #1098 )
`theme ? 'dark' : 'light'` will always use the dark theme no matter what it's set to in context. Guessing this is not what was intended? This PR fixes it.
7 years ago
Dan
3d38ca4724
Fix CI
7 years ago
Rodrigo Bermúdez Schettino
24f0448d7c
Update Ref API in docs ( #970 )
* Update Ref API in docs
Update to new React.createRef() API in guide "Uncontrolled Components".
* Update Ref API in doc example
Use new Ref API in guide's example.
* Fix syntax error in example
* Update highlighting ranges in docs
After updating to the new createRef API, the highlighting ranges in Uncontrolled Components were wrong.
* Update highlighting ranges in docs example
After updating to the new createRef API, the highlighting ranges in Uncontrolled Components were wrong.
* Update highlighting ranges in docs example
Remove empty line in source code.
* Update uncontrolled-components.md
* Update input-type-file.js
7 years ago
Brian Vaughn
f5b7b76d30
Updated Code Sandbox links. Mentioned Redux.
7 years ago
Brian Vaughn
1d82c291fe
Fix CodeSandbox demo to show the specific problem we are trying to illustrate
7 years ago
Brian Vaughn
70e0076c44
Added anti-pattern CodeSandbox demo link
7 years ago
Brian Vaughn
3e80980c18
Renamed params for gDSFP
7 years ago
Andrew Clark
30be0d05fa
Add back pointer events example
7 years ago
Andrew Clark
55b251146d
Add pointer events example
7 years ago
Travis Arnold
fc99015393
swap example theme colors ( #851 )
7 years ago
Brian Vaughn
cad9c0e424
Prettier
7 years ago
Dan Abramov
e32847f030
Add a defaultValue for context example
7 years ago
Lucas Duailibe
dab9b8b2fd
Add 'visual components' use case for forwarding refs ( #798 )
* Add 'visual components' use case for forwarding refs
* Rearrange "forwarding refs" to focus on simple use case
* Minor wording nits to 2018-03-29-react-v-16-3.md
* Minor wording nits to forwarding-refs.md
* Add more info to the forwardRef reference doc
* Minor wording nits to reference-react.md
7 years ago
Brian Vaughn
7351d11a89
Fixed invalid getSnapshotBeforeUpdate() example code ( #799 )
* Fixed invalid getSnapshotBeforeUpdate() example code
* Don't use class properties in stable docs
7 years ago
Toru Kobayashi
f450adbdec
Add a section "Displaying a custom name in DevTools"
7 years ago
Dan Abramov
7ab54e2928
Remove too much highlighting in a small snippet
7 years ago
tjallingt
6521a654cb
Added updating nested context default value example ( #780 )
* added context default value example
* Implement suggested change
* noop function as default value to createContext
7 years ago
tjallingt
e4941f6440
Added example for updating nested context consumer ( #776 )
* Added an example showing how to update the context from inside a (deeply) nested component
* Wrap comments
* Wrap comments
* Tweak wording
* Prettier
* Prettier
* Typo: "funtion" -> "function"
7 years ago
Dan Abramov
f7cf140607
Tweak context docs ( #766 )
7 years ago
Brian Vaughn
ec718a33ee
Updated react-lifecycles-compat example to show 2.0 named export
7 years ago
Toru Kobayashi
0ea7d99127
Revert "Adopt bvaughn's example"
This reverts commit 2e1554dc32
.
7 years ago
Toru Kobayashi
2e1554dc32
Adopt bvaughn's example
7 years ago
Chanyeon Kim
e8cdf5128a
Fix button => themed-buton ( #752 )
7 years ago
Tom Gallacher
17d04ac9f3
Fix: added missing component instantiation within the 'forwardRef' API example
7 years ago
Pat
e61d594b64
Minor: context/theme-detailed-app.js broken ( #746 )
* Minor: context/theme-detailed-app.js broken
Today I tested out the new Context API using using [CRA](https://github.com/facebook/create-react-app ).
I encountered a runtime exception, so this tiny PR is intended to make it easier for future Context API learners.
`ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor`
create-react-app@next commit da518d2238298dd5db74e9c63c12251099f87bb0
* Update theme-detailed-app.js
7 years ago
Nathan Quarles
51a864d858
Fix cDU to correctly make async request
When a new `id` prop is passed in, `getDerivedStateFromProps` sets `this.state.externalData` to `null`. If I understand the new API correctly the return value of gDSFP() either becomes the new state or is merged into the new state? If so, then `componentDidUpdate` should examine the new state (`this.state.externalData`), not `prevState.externalData`.
7 years ago
Christian Maughan Tegnér
b1d705ad60
Use correct component name in context doc example ( #740 )
* Use correct component name in context doc example
I'm assuming the intention was to reference the `FancyButton` component defined directly above, unless I'm misunderstanding how to read this example.
* Prettier
7 years ago
Toru Kobayashi
c72935a054
prettier
7 years ago
Toru Kobayashi
d5c449d824
React.forwardRef accepts a render function, not Functional Component
7 years ago
Brian Vaughn
73ba23fccd
Updated createRef example not to use class property syntax
7 years ago
Brian Vaughn
3a36a402a5
Revert "Added inline child function caveat to Context docs"
This reverts commit 691cd4577c
.
7 years ago
Brian Vaughn
797a792b77
Revert "Prettier"
This reverts commit 032576cf7b
.
7 years ago
Brian Vaughn
032576cf7b
Prettier
7 years ago
Brian Vaughn
691cd4577c
Added inline child function caveat to Context docs
7 years ago
Brian Vaughn
6afbc7b56e
Added side effects props change example
7 years ago
Brian Vaughn
9113b4c829
Fixed example props/prevProps
7 years ago
Dan Abramov
77dae36663
Use examples without types in the post ( #719 )
7 years ago
Brian Vaughn
46103921fe
Changes in response to Sophie's feedback
7 years ago
Brian Vaughn
7cf5b58187
Wordsmithing
7 years ago