44 lines
1.8 KiB
Markdown
44 lines
1.8 KiB
Markdown
|
### Окружение:
|
|||
|
- [nodejs 20 LTS latest](https://nodejs.org/en/download/);
|
|||
|
- [VSCode](https://code.visualstudio.com/download);
|
|||
|
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) плагин для VSCode;
|
|||
|
- [CSS Class Intellisense](https://marketplace.visualstudio.com/items?itemName=Tarrow.css-class-intellisense) плагин для автодополнения CSS-классов в HTML;
|
|||
|
- для отладки необходимы бразузеры Chrome или Edge.
|
|||
|
|
|||
|
Настройки плагина CSS Class Intellisense находятся в файле ./vscode/cssconfig.json
|
|||
|
|
|||
|
### Команды
|
|||
|
|
|||
|
#### Создание пустого проекта:
|
|||
|
|
|||
|
```commandline
|
|||
|
npm create vite@latest ./ -- --template react
|
|||
|
```
|
|||
|
|
|||
|
#### Установка зависимостей:
|
|||
|
|
|||
|
```commandline
|
|||
|
npm install
|
|||
|
```
|
|||
|
|
|||
|
#### Запуск проекта в режиме разработки (development):
|
|||
|
|
|||
|
```commandline
|
|||
|
npm run dev
|
|||
|
```
|
|||
|
|
|||
|
#### Запуск проекта в продуктовом режиме (production):
|
|||
|
|
|||
|
```commandline
|
|||
|
npm run prod
|
|||
|
```
|
|||
|
|
|||
|
### Полезные ссылки
|
|||
|
|
|||
|
1. Global Object - https://developer.mozilla.org/en-US/docs/Glossary/Global_object
|
|||
|
2. Global Scope - https://developer.mozilla.org/en-US/docs/Glossary/Global_scope
|
|||
|
3. localStorage - https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
|
|||
|
4. JavaScript Execution Context – How JS Works Behind The Scenes - https://www.freecodecamp.org/news/execution-context-how-javascript-works-behind-the-scenes/
|
|||
|
5. Extracting State Logic into a Reducer - https://react.dev/learn/extracting-state-logic-into-a-reducer
|
|||
|
6. Passing Data Deeply with Context - https://react.dev/learn/passing-data-deeply-with-context
|
|||
|
7. Scaling Up with Reducer and Context - https://react.dev/learn/scaling-up-with-reducer-and-context
|