Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Lil-Youn authored Jun 24, 2023
1 parent 2a415c7 commit 0018a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default App;

Now that we have created our React components, we can integrate them into our Rails app. The page that will be displayed on the Rails app is app/views/layouts/application.html.erb, so we have to link our React components to this file. This is similar to the index.html page that are in create-react-app setups, where the index.html page links React components to that page.

Remove the <%= vite_javascript_tag ‘application' %> as we have deletedapp/javascript/entrypoints/application.js. Include this javascript tag: <%= vite_javascript_tag ‘index.jsx' %> to load the index.jsx file we have defined earlier.
Remove the <%= vite_javascript_tag ‘application' %> as we have deletedapp/javascript/entrypoints/application.js. Include this javascript tag: (https://github.com/Lil-Youn/vite-rails-typescript-sample-app/blob/2a415c7f647a4aa753c1b539d6bd1a670336a436/app/views/layouts/application.html.erb#L10) to load the index.jsx file we have defined earlier.

In app/views/homepage/index.html.erb, replace the existing code with <div id="root /> so the contents of the React app can be displayed in this div tag.

Expand Down

0 comments on commit 0018a8d

Please sign in to comment.