Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 20 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

41 changes: 21 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 0 additions & 8 deletions .prettierrc.json

This file was deleted.

25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
# React assigment - 3 : Create new Resource
# React + Vite

## Total points = 5
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

### Purpose of this assignment : Testing students skills on
Currently, two official plugins are available:

- useState() hook
- Controlled component
- state lifting

### [Click here to see the project demo](https://create-new-todo.netlify.app/)

### Assignment steps:

- part 1: Things you have to do in NewTodo component
- Store all the user inputs inside todo state and use the handleChange function for handling the onChange events for all the input fields (point: 1)
- handle the form submission in a way that the new todo data is passed to App.js Component (point: 1)
- Please reset the form data after submitting the form (point: 1)
- part 2: Things you have to do in App.js component
- update the todos state with the newTodo data from NewTodo component (point: 2)
- finally check the project demo and try to match your one as much as possible

#### [Assignment was created with ♥ by [anisul islam](https://www.youtube.com/c/anisulislamrubel) ©Anisul Islam]
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading