reactjs/react-rails

React Routing Breaks on Page Refresh

RailsCod3rFuture opened this issue · 1 comments

Steps to reproduce

  1. create a rails 7.1 application
  2. setup an index action with a react component
  3. setup a react router configuration
  4. refresh the page and you'll get a missing template action on any other path other than the index path.
    (Guidelines for creating a bug report are available
    here
    )

Expected behavior

Tell us what should happen
The react router should function in a way where the routing goes back to the react component for all other endpoints in the routing schema as well

Actual behavior

Tell us what happens instead
when you refresh on a routed action - rails 7 complains that the view for the action is missing

System configuration

  • Shakapacker or Sprockets version:
    8.0.2
  • React-Rails version:
    -3.2.1
  • Rect_UJS version:
  • 3.2.1
  • Rails version:
  • 7.1.3.2
  • Ruby version:
    3.2.4

In our rails 6 applications - react-router sends the user back to the route within the react component, but now its treating the route as a rails transaction
(Describe your issue here)