Hi, I am trying to figure React Context default behaviour when not using nanostores. I managed to set up nanostores but I am studying Astro architecture to better understand it.
Here is a Stablitz demo. When setting up a context provider in a .astro file, the context value will be the default value. Ok.
But when setting the context in a React component, I have no value in it.
https://stackblitz.com/edit/astro-react-context?file=src%2Fcomponents%2FContent.tsx
Shouldn't the context that is within a React component, so a single Astro island, work as usual ? It seems to work even worse than the context set in an Astro files which at least shows the default value.
I understand that it won't work across islands, but I don't get what happens for a single given island.
#React Context default behaviour
4 messages · Page 1 of 1 (latest)