ReactN is an extension of React that includes global state management. It treats the global state as if it were built into React itself, without the boilerplate of third-party libraries. For class components, simply change import React from "react"; to import React from "reactn";, and your React class components will have a global state built in! The global state in function components behaves almost identically to the local state. Global reducers in function components behave almost identically to local reducers. Global state in class components behaves exactly like local state! If you are using concurrent server-side rendering or otherwise want to work with multiple global states, follow the README for the Provider component, which allows you to limit a ReactN state to a React Context. You can initialize your global state using the setGlobal helper function.

Features

  • ReactN supports TypeScript out of the box!
  • It is written entirely in TypeScript
  • Auto-complete, and error-catching abilities
  • TypeScript can maintain inferred global state and reducer shape of a Providers
  • By importing React from reactn instead of react, you bake global state directly into the React namespace
  • Use addCallback to execute a function whenever the state changes

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow ReactN

ReactN Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ReactN!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Software Development Software

Registered

2022-04-07