React
@nanostores/react
React integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
React Native Libraries
react
react native
state
state manager
store
@nanostores/react
React Native Libraries
javascript
npm
frontend
Stars
142
Weekly
1.6M
Open issues
2
Bundle
~25 kB
Installation
npm install @nanostores/reactCode example
import { View, Text, StyleSheet } from "react-native";
import { React } from "@nanostores/react";
export function Example() {
return (
<View style={styles.box}>
<Text style={styles.title}>React</Text>
<React />
</View>
);
}
const styles = StyleSheet.create({
box: { flex: 1, alignItems: "center", justifyContent: "center", gap: 8 },
title: { fontSize: 18, fontWeight: "600" },
});Pros & cons
Pros
- Actively maintained by Andrey Sitnik
- 1.6M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- 2 open issues on GitHub