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

react-mvvm-architecture

v1.0.43

Published

React MVVM Architecture is a simple and opinionated custom React framework that provides a solid foundation for building modern, efficient, and scalable React applications following the principles of MVVM (Model-View-ViewModel) and Clean Architecture. It

Downloads

46

Readme

React MVVM Architecture (Beta)

React MVVM Architecture is a custom React framework designed to simplify the development of modern, efficient, and scalable React applications using the MVVM (Model-View-ViewModel) architectural pattern. It provides a solid foundation and a well-organized project structure to help developers get started quickly.

Getting Started

To create a new React app using React MVVM Architecture, run the following command:

npx react-mvvm-architecture my-new-app

Replace my-new-app with the desired name for your project.

After running the command, your new React app will be set up with TypeScript support, Zustand, and React Query installed. The App.tsx file will be customized to include the setup for React Query.

Features

  • Bootstrap new React projects with TypeScript support and pre-installed packages like Zustand and React Query.
  • Follows the principles of MVVM for better code maintainability and scalability.
  • Customized App.tsx file with React Query setup to handle data fetching seamlessly.

Project Structure

react-mvvm-architecture
├── node_modules/      <-- Contains installed npm packages
│   └── ...
├── public/            <-- Public assets for the React app
│   ├── index.html
│   ├── favicon.ico
│   └── ...
├── src/               <-- Source code for the React app
│   ├── models/        <-- Models for data representation
│   │   └── Todo.ts    <-- Example model (Todo)
│   ├── view/          <-- React components for rendering UI
│   │   ├── components/
│   │   │   └── TodoItem.tsx
│   │   ├── TodoList.tsx
|   |
│   ├── viewmodels/    <-- ViewModels to manage view logic and state
│   │   ├── TodoViewModel.ts
│   │   └── index.ts   <-- Entry point to export viewmodels
│   ├── services/      <-- Services for data handling and API calls
│   │   └── TodoService.ts
│   ├── App.css
│   ├── App.tsx        <-- Customized entry point for the React app
│   ├── index.css
│   └── index.tsx      <-- Main entry point for rendering the app
├── package.json       <-- Project configuration and dependencies
└── README.md          <-- Documentation for the React MVVM Architecture

Why React Query and Zustand?

React MVVM Architecture leverages React Query and Zustand for several reasons:

  1. Simplicity: React Query and Zustand offer simplicity, reducing the boilerplate code required in traditional state management libraries like Redux.

  2. Performance: React Query optimizes data fetching with automatic cache management and background data synchronization, resulting in faster and more efficient data updates.

  3. TypeScript Support: Both React Query and Zustand provide excellent TypeScript support, making it easier to work with typed data in large-scale applications.

  4. Separation of Concerns: Zustand follows a store pattern, keeping store and state logic within the same component, leading to clearer separation of concerns and a more concise codebase.

  5. Minimal Boilerplate: React Query and Zustand eliminate the need for complex setup and boilerplate code often associated with Redux.

Customization and Contribution

React MVVM Architecture is designed to be customizable and extensible. While it comes with pre-installed packages like React Query and Zustand, you can add additional packages as per your development needs. Modify the generated project structure, add new features, or integrate other libraries to tailor the framework to your specific project requirements.

Suitable for Small to Large Scale Applications

React MVVM Architecture suits projects of various sizes, from small prototypes to large-scale production applications. Its clean and scalable project structure, combined with the power of React Query and Zustand, ensures your application can grow and adapt as your project requirements evolve.

Under Development

Please note that React MVVM Architecture is currently under development. It has not been uploaded to GitHub yet. Once I accomplish my goal of creating this package to my satisfaction, it will be made available on GitHub. I welcome your feedback and suggestions! Feel free to reach out to me at [email protected] with any feedback or suggestions.

About the Author

My name is Aamir Mansuri, and I am a passionate React JS Developer. This custom React framework, inspired by the MVVM principles, is my contribution to the developer community, and I hope it helps you kickstart your React projects with ease and productivity.

Happy coding!