react_on_rails icon indicating copy to clipboard operation
react_on_rails copied to clipboard

Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.

Results 55 react_on_rails issues
Sort by recently updated
recently updated
newest added

## Summary This PR adds - `react_on_rails:generate_packs` rake task - updates to View Helpers to generate component packs if not present. - add `auto_load_bundle` config option - add `tests` for...

- [ ] `/Gemfile.lock` is currently ignored. This used to be the recommendation, but [the current Bundler docs](https://bundler.io/v2.2/guides/faq.html#using-gemfiles-inside-gems) disagree: > Q: Should I commit my `Gemfile.lock` when writing a gem?...

enhancement

We need to cover use with Turbo in integration or unit tests, because some code paths are currently not tested. Make sure Strict Mode is used. Turbolinks 5 should ideally...

enhancement

See https://reactjs.org/docs/strict-mode.html. This should help detect more bugs in RoR.

enhancement

- [x] Currently, `unmount` in `clientStartup.ts` does https://github.com/shakacode/react_on_rails/blob/fa2fe25eb6a749d1605d6aa7abd11ef4f911c9f6/node_package/src/clientStartup.ts#L216 With the new Root API, it should be replaced by `root.unmount()`, which means we need to store rendered roots. The current approach...

enhancement

Since spec/dummy is now using React 18 (#1463), and we still want compatibility with React 16, we need integration tests for React 16. Could add an example to generators, but...

enhancement
contributions: up for grabs!

- [x] Upgrade to rails/webpacker v6 final - [ ] Integrate https://github.com/shakacode/react-on-webpacker https://www.npmjs.com/package/react-on-webpacker into spec/dummy - [x] Upgrade of spec/dummy examples to Rails 7 - [x] Upgrade spec/dummy to React...

## Environment 1. Ruby version: 3.0.2 (eventually) 2. Rails version: 7.0.0 3. Webpacker version: 6.1.1 4. React on Rails version: 13.0.2 ## Expected behavior Following [spec/dummy/README.md](spec/dummy/README.md) should install and start...

documentation

This change is broken: https://github.com/shakacode/react_on_rails/commit/9637c09e46372f92d09113a2eb61b3658b47b351#diff-ee77363403f2346e5588ba25b2ef77d2b8e70d3c699fec17edf68fa3dd3b6766R127 ## Repro: 1. Set react_on_rails.rb to have `config.build_production_command = "yarn start build.prod"` 2. Run `RAILS_ENV=production NODE_ENV=production rake assets:precompile`. `bin/webpacker` will run twice. ## Workaround `WEBPACKER_PRECOMPILE=false...

bug

I'm trying Testing React Hooks with react_on_rails gem and noticed there is a Error: "Hooks can only be called inside the body of a function component error." Without using ReactOnRails...

discussion