Browse Source

[Beta] useContext API (#4378)

* [Beta] useContext API

* Simplify + add

* Tweaks

* Softer

* Tweaks

* Small tweaks
main
dan 3 years ago
committed by GitHub
parent
commit
299dad85be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1395
      beta/src/pages/apis/usecontext.md
  2. 1
      beta/src/pages/apis/useref.md
  3. 4
      beta/src/sidebarReference.json

1395
beta/src/pages/apis/usecontext.md

File diff suppressed because it is too large

1
beta/src/pages/apis/useref.md

@ -15,6 +15,7 @@ const ref = useRef(initialValue)
- [Usage](#usage)
- [Referencing a value with a ref](#referencing-a-value-with-a-ref)
- [Manipulating the DOM with a ref](#manipulating-the-dom-with-a-ref)
- [Exposing a ref from your component](#exposing-a-ref-from-your-component)
- [Avoiding recreating the ref contents](#avoiding-recreating-the-ref-contents)
- [Reference](#reference)
- [`useRef(initialValue)`](#useref)

4
beta/src/sidebarReference.json

@ -15,6 +15,10 @@
"title": "useState()",
"path": "/apis/usestate"
},
{
"title": "useContext()",
"path": "/apis/usecontext"
},
{
"title": "useRef()",
"path": "/apis/useref"

Loading…
Cancel
Save