Skip to content

A React app demonstrating the simplicity of a Vite setup / configuration and the benefits of React Router, Actions & Loaders in Forms to do away with state management (useState)

Notifications You must be signed in to change notification settings

chrisj-skinner/vite-react-router-express-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Router App with(out) useState Hook

This is a simple React application that demonstrates the benefits of React Router for navigating between different components, in addition to using actions and loaders to do away with the need for useState Hook.

Features

  • React Router for routing
  • Navigation between different components/pages
  • Utilise React Form
  • Utilization of actions and loaders in React Form remove any state management
  • Modal implementation
  • Fetching existing posts from an Express 'dummy' backend
  • Adding new posts to an Express 'dummy' backend

Installation

To install the dependencies, run the following command:

npm install

Running the App

This app requires an Express server to be running before starting the development server.

To start the Express server, run the following command:

npm start

Then, to start the React development server, run the following command:

npm run dev

The app will start running at http://localhost:3000.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A React app demonstrating the simplicity of a Vite setup / configuration and the benefits of React Router, Actions & Loaders in Forms to do away with state management (useState)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published