diegohaz/constate

React Context + State

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 1 hour ago
Added to GitGenius on September 17th, 2026
Created on March 30th, 2018
Open Issues & Pull Requests: 6 (+0)
GitHub issues: Enabled
Number of forks: 94
Total Stargazers: 4,006 (+0)
Total Subscribers: 26 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 18.1 hours
Mean response time: 562.7 days
90th percentile: 1765.6 days
Tracked items: 7

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,487 days
Stale 30+ days: 2
Stale 90+ days: 1

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • discussion (2)
  • enhancement (2)

Most active issues this week

Sign in to see which issues are moving.

Detailed Description

Constate is a React state management library that combines React Hooks and React Context.

The library solves the problem of managing local component state that needs to be shared across a component tree. It lets developers write state logic using custom React Hooks and automatically lifts that state into React Context only when needed, without requiring manual context setup. The approach uses a factory function that accepts a custom hook and optional selector functions, returning a Provider component and corresponding hooks for consuming the state. Selectors allow splitting state into multiple contexts to prevent unnecessary re-renders in components that only depend on part of the state.

Constate suits projects where you need to share state across multiple components but want to avoid the boilerplate of manually creating context providers and consumers. It works well for scenarios like theming, internationalization, form wizards, and other shared state patterns. The library is particularly useful when you want to keep state logic colocated in hooks while still making it available throughout a subtree of your component hierarchy.

Work in the issue tracker is dominated by enhancement requests and discussions, indicating active engagement with feature development and community feedback.