21 changed files with 4449 additions and 177 deletions
@ -0,0 +1,22 @@ |
|||||
|
{ |
||||
|
"root": true, |
||||
|
"parser": "@typescript-eslint/parser", |
||||
|
"plugins": ["@typescript-eslint"], |
||||
|
"extends": [ |
||||
|
"eslint:recommended", |
||||
|
"plugin:@typescript-eslint/recommended", |
||||
|
"plugin:react-hooks/recommended", |
||||
|
"plugin:react/recommended", |
||||
|
"plugin:import/recommended", |
||||
|
"plugin:import/typescript", |
||||
|
"plugin:prettier/recommended" |
||||
|
], |
||||
|
"rules": { |
||||
|
"@typescript-eslint/consistent-type-imports": "error" |
||||
|
}, |
||||
|
"settings": { |
||||
|
"react": { |
||||
|
"version": "detect" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,17 +1,25 @@ |
|||||
|
/// <reference types="react/experimental" />
|
||||
|
/// <reference types="react-dom/experimental" />
|
||||
|
|
||||
|
import './index.css'; |
||||
|
|
||||
import React from 'react'; |
import React from 'react'; |
||||
import ReactDOM from 'react-dom'; |
import ReactDOM from 'react-dom'; |
||||
|
|
||||
import App from './App'; |
import App from './App'; |
||||
import './index.css'; |
|
||||
|
|
||||
ReactDOM.render( |
const element = document.getElementById('root'); |
||||
<React.StrictMode> |
|
||||
<App /> |
if (element) { |
||||
</React.StrictMode>, |
ReactDOM.createRoot(element).render( |
||||
document.getElementById('root'), |
<React.StrictMode> |
||||
); |
<App /> |
||||
|
</React.StrictMode>, |
||||
|
); |
||||
|
} |
||||
|
|
||||
// Hot Module Replacement (HMR) - Remove this snippet to remove HMR.
|
// Hot Module Replacement (HMR) - Remove this snippet to remove HMR.
|
||||
// Learn more: https://snowpack.dev/concepts/hot-module-replacement
|
// Learn more: https://www.snowpack.dev/#hot-module-replacement
|
||||
if (import.meta.hot) { |
if (import.meta.hot) { |
||||
import.meta.hot.accept(); |
import.meta.hot.accept(); |
||||
} |
} |
||||
|
|||||
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue