Conversation
README.md
Outdated
|
|
||
| ```javascript | ||
| //= require "turbolinks" | ||
| ReactComponentsRails.setup({ Hello }) // ES6 shorthand for {Hello: Hello} |
There was a problem hiding this comment.
Since turbolink has been deprecated in rails7 in favor of turbo-rails, we have made it work as follows.
However, this method may affect performance.
| ReactComponentsRails.setup({ Hello }) // ES6 shorthand for {Hello: Hello} | |
| document.addEventListener("turbo:load", function() { | |
| ReactComponentsRails.setup({ Hello }) // ES6 shorthand for {Hello: Hello} | |
| }) |
|
during "compilation" with esbuild I get this error: I don't know microbundle, but as a workaround changing the default field to ./dist/react-components-rails.module.js my application package.json contains: |
|
Sorry, it took me quite a lot of time to come back to this project. The gem should now be fixed, I reworked the JS build process and added support for the new React 18+ render API. I just published I plan to merge this to |
This avoids the need to call `regenerator-runtime` when transpiled
Also use the direct import from `react-dom` as fallback, not our own variable
|
I tested the latest beta ( Lodash is also removed, this package no longer has any dependency :) |
|
It's on production for some times now without any problem :) my configuration at this time:
Can we expect a new non beta release? |
|
We are also successfully building with 1.0.0-beta.4 on both React 17 (with the my documented webpack workaround) and React 18 on webpack 5. It would be great to see this merged to |
|
@renchap I notice that ujs integration hasn't yet been implemented. Would you like some assistance completing this branch? |

As discussed in #132, this is a rename and rewrite of this library.
Webpacker is now deprecated and wont get any new updates, but this library no longer relied on Webpacker.
The new name,
react-components-rails, shows this (thanks @yubele for the suggestion).I chose to start a new project nearly from scratch to have a much simpler and modern development setup for this. I copied the existing source code so it should behave the same way, but the Javascript library is now build using
microbundleand written in Typescript.TODO: