Updated README.md with more relevant info
This commit is contained in:
1 parent
84d1382cb4
commit
2e7ac91491
1 file changed
+24
-50
@@ -1,54 +1,28 @@
|
|||||||
# React + TypeScript + Vite
|
# Pohovor projekt
|
||||||
|
|
||||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
Jednoduchá aplikace na přidávání úkolů v reactu
|
||||||
|
|
||||||
Currently, two official plugins are available:
|
## Spuštění
|
||||||
|
```
|
||||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
cp .env.example .env
|
||||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
npm i
|
||||||
|
npm run dev
|
||||||
## Expanding the ESLint configuration
|
|
||||||
|
|
||||||
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
||||||
|
|
||||||
```js
|
|
||||||
export default tseslint.config({
|
|
||||||
extends: [
|
|
||||||
// Remove ...tseslint.configs.recommended and replace with this
|
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
|
||||||
// Alternatively, use this for stricter rules
|
|
||||||
...tseslint.configs.strictTypeChecked,
|
|
||||||
// Optionally, add this for stylistic rules
|
|
||||||
...tseslint.configs.stylisticTypeChecked,
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
// other options...
|
|
||||||
parserOptions: {
|
|
||||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
||||||
tsconfigRootDir: import.meta.dirname,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
## Požadavky
|
||||||
|
- Stránky
|
||||||
```js
|
- `/` - seznam úkolů a formulář na přidání nového úkolu
|
||||||
// eslint.config.js
|
- `/task/:id` - detail úkolu
|
||||||
import reactX from 'eslint-plugin-react-x'
|
- Stack
|
||||||
import reactDom from 'eslint-plugin-react-dom'
|
- [Typescript](https://www.typescriptlang.org/)
|
||||||
|
- [React](https://react.dev/) (v18+) + [Vite](https://vite.dev/)
|
||||||
export default tseslint.config({
|
- [React Hook Form](https://react-hook-form.com/)
|
||||||
plugins: {
|
- [React-router-dom](https://reactrouter.com/) (v6+)
|
||||||
// Add the react-x and react-dom plugins
|
- [Tailwind CSS](https://tailwindcss.com/) nebo [Material UI](https://mui.com/material-ui/) nebo vlastní CSS
|
||||||
'react-x': reactX,
|
- Mé řešení používá **Material UI**
|
||||||
'react-dom': reactDom,
|
- React funkce
|
||||||
},
|
- `useRef()` pro datum vytvoření tasku
|
||||||
rules: {
|
- `useState()` pro správu všech tasků
|
||||||
// other rules...
|
## Možná vylepšení
|
||||||
// Enable its recommended typescript rules
|
- zod validace
|
||||||
...reactX.configs['recommended-typescript'].rules,
|
- persistentní ukládání tasků (local storage, IndexDB, externí databáze přes API, ...)
|
||||||
...reactDom.configs.recommended.rules,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
|
||||||
Reference in new issue
Block a user