shakacode / react_on_rails

Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
https://www.shakacode.com/react-on-rails/docs/
MIT License
5.09k stars 627 forks source link

Enable StrictMode everywhere in spec/dummy #1465

Open alexeyr-ci1 opened 2 years ago

alexeyr-ci1 commented 2 years ago

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

justin808 commented 2 years ago

@alexeyr-ci1 SGTM

alexeyr-ci1 commented 2 years ago

@justin808 After #1463 to avoid doing the work twice, StrictMode added some more restrictions in React 18.

ahangarha commented 1 year ago

... StrictMode added some more restrictions in React 18.

In bad way? Anything particular apart from twice rendering which is deliberate?

May you please elaborate on this? @alexeyr-ci1

alexeyr-ci1 commented 1 year ago

In bad way? Anything particular apart from twice rendering which is deliberate?

No, in a good way which catches more errors, which is what we want StrictMode for.