https://github.com/mfellner/react-context-portal
Created with CodeSandbox
https://github.com/mfellner/react-context-portal
Last synced: 2 months ago
JSON representation
Created with CodeSandbox
- Host: GitHub
- URL: https://github.com/mfellner/react-context-portal
- Owner: mfellner
- Created: 2021-02-21T17:46:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-21T17:46:37.000Z (over 4 years ago)
- Last Synced: 2024-10-12T00:21:06.413Z (8 months ago)
- Language: JavaScript
- Homepage: https://codesandbox.io/s/github/mfellner/react-context-portal
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Render React elements through a "context portal"
Based on @visualglitch91's [tweet](https://twitter.com/visualglitch91/status/1363135740109062146).
Explanation:
```jsx
// Provides page header context:
{/* Uses page header context. */}
{/* Renders children into the context state. */}
Will render in the header.
```