You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
turboReloadJs is just for re-initializing flowbite/tailwindcss
this selector [data-signal-react-rerender] is searching for span tag from signal_react_rerender
Something I noticed is without debounced and delayed call to ReactOnRails.reactOnRailsPageLoaded();
console warns with Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
This is caused because this event gets called twice and of course, it's happening before stream rendering.
Environment
Ruby version: 3.1.2
Rails version: 7.0.4
Webpacker version: 6.5
React on Rails version: 13.2
Expected behavior
ReactOnRails should re-render/hydrate components after turbo-stream form replacement where we have react_component helper called within the replaced form
Actual behavior
Components do not get re-rendered/hydrated after turbo-stream form replacement
So I'm using turbo streams for re-rendering forms when there are errors.
where I replace the form
edit.turbo_stream.erb
where form
_form.html.erb
where controller actions
The issue arises when I submit the form, react_component does not get re-rendered/hydrated even with
The workaround I found is event listening for "turbo:before-stream-render"
turboReloadJs
is just for re-initializing flowbite/tailwindcssthis selector
[data-signal-react-rerender]
is searching for span tag fromsignal_react_rerender
Another thing
Something I noticed is without debounced and delayed call to
ReactOnRails.reactOnRailsPageLoaded();
console warns with
Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
This is caused because this event gets called twice and of course, it's happening before stream rendering.
Environment
Expected behavior
ReactOnRails should re-render/hydrate components after turbo-stream form replacement where we have
react_component
helper called within the replaced formActual behavior
Components do not get re-rendered/hydrated after turbo-stream form replacement
Small, reproducible repo
https://github.com/uvera/React-on-rails-turbo-js-bug-reproduction
The text was updated successfully, but these errors were encountered: