Giter VIP home page Giter VIP logo

revite's Introduction

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

revite's People

Contributors

nik96i avatar

Watchers

 avatar

revite's Issues

Implement API layer

Implement an API layer using Axios. It should handle errors, have a cancel request functionality and return the request statuses (like react-query: isLoading, isError, etc), data and error.
Using react-query or not ?

What about optimistic updates?

Implement some sort of optimistic updates (in the API layer) to improve UX and prevent users from waiting some amount of time for an async operation to be done.

Handling app's unexpected errors (Error Boundary)

Wrap the entire app into some error handler component to show an error page whenever an unexpected error happens!
In the production mode, it should appear and prevent the user from seeing the actual error on the page.

What about browser support?

We need to specify the app's minimum browser version requirements and use tools like ESLint to prevent developers from using JS/CSS functions/features to violate that requirement.
Or maybe, by using some other pollyfills we can use newer functions/features but with more browser support compatibility?

Add alias support to the Vite

Add alias support to the Vite and TypeScript.

Also, think about implementing some mechanism for nice feature-based paths.

Add ESLint

Configure ESLint JS + TS With new config format (Flat Config).

Add a simple feature with CRUD operations

Add a feature with add, edit, view and delete functionality.
It should use/implement every aspect of the project like theme, i18n, routing, and global and local state management.
maybe an example to avoid props drilling?

Implement a feature registrar mechanism

Every feature may have routing, i18n, views, etc. Registering every one of them is painful.
Implement some registrar mechanism to register all feature's functionalities in one place.

Add import/export ESLint rules

Add some ESLint rules for import/export from features.

For example:

  • Only imports from the feature's index file are allowed (From the outside of the feature's directory).

What about API flickering loader?

A flickering loader occurs when Calling API requests that are complete in a very short time, like 200-300 ms.
We can use some delays to delay the visibility of the loader.
Maybe, we don't need any loader at all.

What about testing?

Research different testing strategies and boilerplates for every one of them.

What about docs?

Use JSDoc, TSDoc or some sort of documentation method for hooks, components, etc.
Also, Use ESLint to force write documentation.

What about network waterfalls?

How we can solve network waterfalls when loading pages/components that need to fetch some data from the API?

Maybe by using react-router or tanstack-router loaders?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.