S
SolidJS•7mo ago
lord

Grouping/Combining multiple context providers

Does anyone know how I can group multiple context providers to my <App /> Without nesting a bunch of it?
4 Replies
DevTech
DevTech•7mo ago
import React, { useContext } from 'react'; import { Context1, Context2, Context3 } from './contexts'; function MyApp() { // Access multiple contexts const dataFromContext1 = useContext(Context1); const dataFromContext2 = useContext(Context2); const dataFromContext3 = useContext(Context3); // Your component logic using data from multiple contexts return ( <div> {/* Your JSX */} </div> ); } export default MyApp;
REEEEE
REEEEE•7mo ago
GitHub
solid-primitives/packages/context at main · solidjs-community/solid...
A library of high-quality primitives that extend SolidJS reactivity. - solidjs-community/solid-primitives
REEEEE
REEEEE•7mo ago
This is not a React server 🙂
lord
lordOP•7mo ago
Thanks this is what i was looking for
Want results from more Discord servers?
Add your server