Skip to content

React Hot reloading #58

Answered by ElMassimo
pepicrft asked this question in Q&A
Discussion options

You must be logged in to vote

I have added a vite_react_refresh_tag helper that you can use to set up HMR with React.

The helper should be used in any layouts or views that use React components:

  <%= vite_client_tag %>
  <%= vite_react_refresh_tag %>
  <%= vite_javascript_tag 'application' %>

If you locked the gems optimistically using ~>, you can upgrade by running bundle update vite_ruby vite_rails.

Vite.React.Refresh.mp4

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants