-
-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
rehype-react@8.0.0
Steps to reproduce
Minimal reproducible example: https://codesandbox.io/p/devbox/mjnc4d
(no extra steps are required).
Actual behavior
It looks like a new reactive environment/context (whatever it's called) for Solid is being created based on this warning in browser's console: computations created outside a 'createRoot' or 'render' will never be disposed and the fact that context (using createContext) isn't passed down to components inserted through the components option of rehypeReact.
This is in contrast with rehype-react + React, with which it's possible to access context inside these inserted components.
Expected behavior
I expect the value of MyContext, set by MyContext.Provider, to be accessible inside interactive components inserted by rehype-react.
This is needed (I believe) for my use-case since I'm trying to render books (in asciidoc) with stateful, interactive content, and the content state needs to be saved on a per-user basis. Therefore I'm trying to use Context to pass user-specific data to the interactive components.
Runtime
node@20.12.0; Chrome (Brave): 1.73.89 Chromium: 131.0.6778.69 (Official Build) (64-bit)
Package manager
npm@10.5.0
Operating system
Arch Linux (kernel: 6.6.67-1-lts)
Build and bundle tools
Vite