signals icon indicating copy to clipboard operation
signals copied to clipboard

React Signals not working when renderToStaticMarkup is used in an App

Open natocTo opened this issue 2 years ago • 2 comments

Hi, when I tried a library I found that the signals did not work if in an app is used renderToStaticMarkup from react-dom/server. It is a bug or expected behavior?

I created an sandbox for test https://codesandbox.io/s/goofy-pascal-6l1dmf

Same apply if renderToString is used. Everythings works when I remove an usage of those functions.

natocTo avatar Sep 23 '22 06:09 natocTo

It appears this is only an issue when renderToStaticMarkup is used directly from within a component that is currently being rendered by ReactDOM (see working non-nested example).

developit avatar Sep 26 '22 21:09 developit

Hi, thank you for an example. I will test it once again if I can somehow update my code to something like this.

natocTo avatar Sep 27 '22 05:09 natocTo

This is fixed in 1.2.2 https://codesandbox.io/s/angry-tdd-sy0rr6

JoviDeCroock avatar Mar 07 '23 12:03 JoviDeCroock