|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Zustand||35,449||10||1,336||20 hours ago||113||August 01, 2023||6||mit||TypeScript|
|🐻 Bear necessities for state management in React|
|List of top 500 ReactJS Interview Questions & Answers....Coding exercise questions are coming soon!!|
|:fire: A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices.|
|React Redux||22,974||140,108||17,998||3 days ago||126||July 29, 2023||25||mit||TypeScript|
|Official React bindings for Redux|
|30 Days of React challenge is a step by step guide to learn React in 30 days. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw|
|React Redux Links||21,729||a year ago||31|
|Curated tutorial and resource links I've collected on React, Redux, ES6, and more|
|Normalizes nested JSON according to a schema|
|A modified web browser that helps in responsive web development. A web developer's must have dev-tool.|
This is yet another single page web application template using React. However, this project attempts to balance simplicity with developing a real web application that actually "does something useful". It demonstrates authentication, navigation, asynchronous data fetching, error handling, and caching and pagination, etc. using the technologies listed below.
But first, the demo! It displays information retrieved from the Github API - most followed users and most starred repo's. Credentials are user admin and password password.
Note the deployed demo may not always be up to date. Check out the latest project and run the demo yourself. Here's a screenshot:
This design pattern makes even more sense when using React along with Redux, where top-level smart components (a.k.a. containers in this codebase such as
ReposPage) subscribe to Redux state and dispatch Redux actions, while low level components (such as
Header) read data and invoke callbacks passed in as props.
ReposPage would show most followed Github users (with 1000+ followers) and most starred Github repos (with 10000+ stars). The async actions (see
repos under actions) fetch data from the following Github APIs:
The fetched data are stored with the page number as the lookup key, so that the local copy can be shown without the need to re-fetch the same data remotely each time. However cached data can be invalidated if desired.
You can test this by disabling your internet connection. Or even better, you can page through
ReposPage very quickly and hopefully invoke Github's API rate limit for your IP address.
The application would fail gracefully with the error message if data fetching (for a particular page) fails. However, the application can still show cached data for other pages, which is very desirable behavior.
Certain UI pages (
ReposPage) are only accessible after signing in to the application. When accessing restricted pages without signing in first, the application redirects to the
Login page. The authentication is based on JSON Web Token (JWT).
A "server alerts/notifications" use case is implemented to showcase Socket.IO. Whenever a client logs in/out of the application using the API server, the API server will notify currently connected clients via Socket.IO. You can test this use case by opening
the web app in two browsers side by side, and then log in/out the webapp in one browser, and observe the messages in the other browser. The messages are pushed from the server to the clients in "real time", and show up as
Alerts in the header section of the web app.
Although it's "cool" to have universal (server-side, isomorphic) rendering these days, there are many situations (like this one) where that complexity is simply not useful or applicable (e.g. Java backend).
Thanks to create-react-app, we will have a configuration-free dev experience.
To get started, please clone this git repository and then run
npm install once under the project top-level directory.
git clone https://github.com/cloudmu/react-redux-starter-kit.git cd react-redux-starter-kit npm install
This will install the dependencies for the client side.
You’ll need to have Node installed on your machine. (Node >= 6 and npm >= 3 are recommended).
Whenever you want to run/test the program,
cd to the project top-level directory. Use these commands:
Runs the app in the development mode, using the Webpack-provided "development server".
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Note The web app is up and running now, but some features (such as JWT-based authentication and server alerts/notifications) rely on an API Server. Be sure to run the API Server as well.
npm run build
Builds the app for production to the
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
npm run eject
eject is an advanced
create-react-app tool. Read the how-to for details.
The text and scripts above describe the client-side code that is displayed in the web browser. They rely on the Webpack-provided development server that runs on port 3000.
This project also contains a separate API server that runs on a different port (3001) and handles authentication for certain UI pages using JWT based authentication. The client login/logout requests will be proxied to the API server as described in: Proxying API Requests in Development.
In addition, the server will push notifications to the clients via Socket.IO.
First you need to open a separate command line window, and run
npm install under the project's
cd react-redux-starter-kit cd server npm install
Then you can start the API server (under the project's server directory):
npm run server
This starts the API server on port 3001, which listens for authentication (login/logout) requests from the client, and pushes server notifications. At this point, the application is fully operating.