You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[📖 See the proof](/docs/demo)[🚀 Quick Start](#-quick-start)[📚 API Reference](#-api-reference)[🤝 Contributing](#-contributing)
18
+
[📖 See the proof](/docs/demo.md)[🚀 Quick Start](#-quick-start)[📚 API Reference](#-api-reference)[🤝 Contributing](#-contributing)
21
19
22
20
</div>
23
21
24
22
---
25
23
26
-
## 🔥 Core Concept: *"Pre-Rendering"*
24
+
## 🔥 Core Concept: _"Pre-Rendering"_
27
25
28
26
Why re-render UI if all states are known at build time? React Zero-UI **pre-renders** UI states once ( at no runtime cost ), and flips `data-*` attribute to update - that's it.
29
27
30
-
**Example:**
28
+
**Example:**
31
29
32
30
```tsx
33
-
const [, setTheme] =useUI("theme", "dark");
31
+
const [, setTheme] =useUI('theme', 'dark');
34
32
35
33
// Flip theme to "light"
36
-
setTheme("light"); // data-theme="light" on body
34
+
setTheme('light'); // data-theme="light" on body
37
35
```
38
36
39
37
**Tailwind usage:** <small>Anywhere in your app</small>
@@ -48,21 +46,21 @@ setTheme("light"); // data-theme="light" on body
48
46
49
47
React Zero-UI uses a hyper-optimized AST resolver in development that scans your codebase for:
50
48
51
-
*`useUI` and `useScopedUI` hook usage.
52
-
* Any variables resolving to strings (e.g., `'theme'`, `'modal-open'`).
React Zero-UI delivers the fastest, simplest, most performant way to handle global and scoped UI state in modern React applications. Say goodbye to re-renders and prop-drilling.
193
191
@@ -200,6 +198,7 @@ React Zero-UI delivers the fastest, simplest, most performant way to handle glob
200
198
We welcome contributions from the community! Whether it's bug fixes, feature requests, documentation improvements, or performance optimizations - every contribution helps make React Zero-UI better.
201
199
202
200
**Get involved:**
201
+
203
202
- 🐛 Found a bug? [Open an issue](https://github.com/react-zero-ui/core/issues)
204
203
- 💡 Have an idea? [Start a discussion](https://github.com/react-zero-ui/core/discussions)
205
204
- 🔧 Want to contribute code? Check out our [**Contributing Guide**](/docs/CONTRIBUTING.md)
@@ -212,4 +211,4 @@ We welcome contributions from the community! Whether it's bug fixes, feature req
212
211
213
212
Made with ❤️ for the React community by [@austin1serb](https://github.com/austin1serb)
Copy file name to clipboardExpand all lines: docs/CONTRIBUTING.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contributing to React Zero-UI
2
2
3
-
**Thanks for stopping by.** This project exists because builders like you push boundaries. If you're here to experiment, break things, or ship speed — you're in the right place.
3
+
**Thanks for stopping by.** This project exists because builders like you push boundaries. If you're here to experiment, break things, or ship speed - you're in the right place.
4
4
5
5
---
6
6
@@ -11,7 +11,7 @@
11
11
> UI state should not require re-rendering.
12
12
> CSS and `data-*` attributes can be enough.
13
13
14
-
It's fast because it **skips the VDOM entirely**— no state triggers, no diffing, no component redraws.
14
+
It's fast because it **skips the VDOM entirely**- no state triggers, no diffing, no component redraws.
15
15
16
16
### If you contribute:
17
17
@@ -22,9 +22,10 @@ Stay **pre-rendered, declarative, and brutally fast.**
|**⚡️ Zero-UI Benchmark**| Identical DOM with `data-*` switching (10k nodes) |[Zero-UI 10k](https://zero-ui.dev/zero-ui)|[GitHub](https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/zero-ui)|
@@ -26,12 +26,12 @@ Experience the difference between React re-renders and Zero-UI's instant updates
26
26
27
27
## 🧐 Why Zero-UI?
28
28
29
-
Every `setState` in React triggers the full **VDOM → Diff → Reconciliation → Paint** pipeline. For _pure UI state_ (themes, menus, toggles) **that work is wasted**.
29
+
Every `setState` in React triggers the full **VDOM ➡️ Diff ➡️ Reconciliation ➡️ Paint** pipeline. For _pure UI state_ (themes, menus, toggles) **that work is wasted**.
30
30
31
31
### 🔄 Zero-UI's "PRE-rendering" Approach:
32
32
33
33
1.**🏗️ Build-time:** Tailwind variants generated for every state
34
-
2.**🎨 Pre-render:** App renders once with all possible states
34
+
2.**🎨 Pre-render:** App renders once with all possible states
35
35
3.**⚡️ Runtime:** State changes only flip a `data-*` attribute
36
36
37
37
**Result:****5-10× faster visual updates** with **ZERO additional bundle cost**.
@@ -42,15 +42,15 @@ Every `setState` in React triggers the full **VDOM → Diff → Reconciliation
42
42
43
43
<divalign="center">
44
44
45
-
*Tested on Apple M1 - Chrome DevTools Performance Tab*
45
+
_Tested on Apple M1 - Chrome DevTools Performance Tab_
0 commit comments