npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cra-template-react-redux-toolkit

v0.5.2

Published

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Downloads

23

Readme

Create React App with Redux-Toolkit and Material-UI (MUI)

This project provides a customized template that combines Create React App, Redux-Toolkit, and Material-UI (MUI) to kickstart your React application development. By following this template, you can adhere to best practices and quickly establish a consistent and efficient project structure.

Using the Template

To initiate a new project using this template, execute the following command:

npx create-react-app my-app --template react-redux-toolkit

After creating the project, navigate to the project directory and utilize the following scripts:

npm run api

This command starts the JSON server, providing mock APIs accessible at http://localhost:3001. The JSON server is utilized for demonstration purposes, allowing you to interact with the TODO app.

npm start

Use this command to launch the app in development mode. You can access the application in your browser at http://localhost:3000.

Features

1. React Router Dom (Routes)

Easily manage routing with React Router Dom. The template includes three sample routes, each utilizing the <Outlet/> component for layout management.

2. Redux-Toolkit (State Management & Data Fetching)

Harness the power of Redux-Toolkit for seamless state management and data fetching. Examples include:

  • ToDo Example: Demonstrates data fetching, caching, and state management. Implement a Tag System for efficient data categorization.

  • Counter Example: Illustrates basic state management capabilities using Redux-Toolkit.

3. Material-UI (UI Framework)

Leverage Material-UI (MUI) to create a visually appealing and responsive user interface. The template showcases a dashboard layout with an expandable Side Navigation and a Top Bar.

4. React i18Next (Localization)

Implement localization with React i18Next, enabling multi-language support for your application.

5. Error Boundaries

A JavaScript error in a part of the UI shouldn’t break the whole app. Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.

Extending the Project

Consider exploring the following tasks and ideas to enhance the project further:

1. Redux Persist

Enhance data retention and user experience by incorporating Redux Persist. This feature allows the Redux store to persist across sessions, ensuring valuable data continuity. Feel free to explore and implement these tasks to create a more robust and feature-rich application based on this template.

2. Injecting Environment Variables at Runtime (Using env-config.js): & Build Time Variables (Using .env files):

Pros of Injecting Environment Variables at Runtime (Using env-config.js): Flexibility: Environment variables can be changed without rebuilding the application. This is particularly useful for scenarios where you need to manage different configurations for multiple deployment environments or domains.

Dynamic Updates: You can change configuration values in real-time without redeploying, making it easier to adapt to changing requirements.

Single Build: You only need to build the application once, and the same build can be used across different environments with different configurations.

3. Test example TDD

Write test cases that cover user story level

4. Husky

Modern native Git hooks made easy Husky improves your commits and more

4. Authentication & Authorization Best Practices

Delve into additional authentication and authorization strategies, such as OAuth, JWT, and other security mechanisms. Understanding these practices can enhance the security and user experience of your application.

5. Keycloak & Authorization

Integrate Keycloak for robust authentication and authorization. You may find comments in the code that guide you through the setup process. Additionally, there's an alternative library that can simplify this integration. However, be mindful of its compatibility with the current project version.

Development(Contribute)

simply anyone can clone the project then run the template and check first

run inside the project

npx create-react-app my-app --template file:.

run in different location

npx create-react-app my-app --template file:../path/to/your/template/cra-template-[template-name]