-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't Play Nice with react-dom/server #43
Comments
Hello @spudly. The thing is React dependency injection is quite weird and does not go well when different renderers are used in the same script because a single React instance will share things with both renderers. Check, for instance this lib's injection file mimicking I am not sure what kind of solution exist in this case but we can try to create one together if you want. I guess using some kind of mocking library could work in some way here. Or else using two different scripts by spawning a process in the first one... |
The ‘best’ idea would be to have two completely different versions of react, one for |
That can work indeed. However, can you register two versions of the same dependency in the same On a side note, even if this would do the trick, it's not satisfactory. But I guess we cannot do much thing about this since this seems to truly be a React issue here. |
Yeah indeed. The fact that React requires to be modified by the renderer somehow shuts the functionality down. |
Dirty hacks it is then. |
Darn. Since the React team doesn't have time to work on this it looks like my best options at this point are to either fork my process or spawn two separate subprocesses and somehow facilitate communication between the two. Thanks for all your help. |
Forks are quite easy to communicate with through Another solution would be to create a clever hack fixing React's injection by monkey patching it but it will surely break on further updates. |
I have a terminal application that includes a server for rendering html with react. I tried to integrate react-blessed so that I could create a better experience in the terminal using react. Everything works as expected until a request comes in, which causes something to be rendered with react-dom/server.
When that happens, I get the error, "Invalid blessed element "html" which is created in src/ReactBlessedComponent.js on line 110. (after trying to render a component that begins with an tag)
Why is react trying to mount the element using react-blessed when I called ReactDomServer.render()?
I'm guessing it has something to do with the lowercased tags being mapped to blessed widgets but I'm not sure where to look.
If someone can point me in the right direction, I'd be willing to submit a pull request to fix the issue.
The text was updated successfully, but these errors were encountered: