Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ci workflow & update react template #31

Merged
merged 6 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: update react template
  • Loading branch information
shogo0421 committed Oct 28, 2024
commit ab9473b576efafed404724a00a691dad585cc5db
13 changes: 6 additions & 7 deletions templates/react-ts/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.tsx';

ReactDOM.render(
Copy link
Contributor Author

@shogo0421 shogo0421 Oct 28, 2024 β€’

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReactDOM.render is deprecated.

ref : react template in create-vite

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestion.

We would like to avoid making multiple changes to a single pull request.
Could you create a separate pull request for React?

<React.StrictMode>
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
</StrictMode>
);
14 changes: 7 additions & 7 deletions templates/react/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App.jsx';

ReactDOM.render(
<React.StrictMode>
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
</StrictMode>
);