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

[박지민] sprint8 #553

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
Copy link
Collaborator

Choose a reason for hiding this comment

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

"as" 키워드로 type assertion 하셨군요. 👍

type assertion을 사용하면, 타입추론을 덮어쓸 수 있으니, 타입에러는 피할 수 있지만, 런타임에, 즉 동작중에는 충분히 다른값이 들어갈 수 있습니다. 주의해주세요

);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
Expand Down