Universal rendering does not trigger re-render and onMount or onCleanup
I am trying to implement a custom renderer using
solid-js/universal
but I am not able to get onMount
or onCleanup
to work, and neither does setCount()
re-render.
here's my code:
5 Replies
output looks like this
it's possible that, instead of the usual browser one, server build is getting pullled in which is not reactive. e.g you'r running this in node
Hmm, is there no way to make it reactive on the server?
i might have mis-worded here. the usual browser build should also run fine on node, it doesn't use browser specific api
https://github.com/solidjs/solid/blob/a72d393a07b22f9b7496e5eb93712188ccce0d28/packages/solid/package.json#L50-L84
i'm not sure if there's any reliable methods rather than patching this. you could try
node --conditions browser ...
( node -C browser ...
)Thanks š
š it worked with
node -C browser
, thanks