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

TodoMVC workload based on React 18 / React Router / Material UI #373

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
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
8 changes: 8 additions & 0 deletions resources/tentative/todomvc-react-18/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["plugin:react/recommended"],
"settings": {
"react": {
"version": "18.2.0"
}
}
}
11 changes: 11 additions & 0 deletions resources/tentative/todomvc-react-18/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
},
};
22 changes: 22 additions & 0 deletions resources/tentative/todomvc-react-18/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
43 changes: 43 additions & 0 deletions resources/tentative/todomvc-react-18/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Speedometer 3.0: TodoMVC with React 18 / Material UI / React Router

## Description

This application uses React 18.0.0 to implement a todo application.

- [React](https://react.dev/) is a JavaScript library for creating user interfaces.
- [Material UI](https://mui.com/) is a UI React-based library that makes it easier to implement a consistent style in an application.
- [React Router](https://reactrouter.com/) is a Router for React, that is a library that handles URL changes.

## Implementation details

React:\
Model: /logic/todo-model.js
View: /components/\*
controller: The React Router configuration in /components/App.tsx

MVC:\
Model: maintains the data and behavior of an application\
View: displays the model in the ui\
Controller: serves as an interface between view & model components

## Built steps

To build the static files, this application utilizes vite. It minifies and optimizes output files and copies all necessary files to a `dist` folder.

## Requirements

The only requirement is an installation of Node, to be able to install dependencies and run scripts to serve a local server.

```
* Node (min version: 18.13.0)
* NPM (min version: 8.19.3)
```

## Local preview

```
terminal:
1. npm install
2. npm run dev
3. Then open http://localhost:5173 in your browser.
```
Loading
Loading