Skip to content

Commit 6d5232d

Browse files
committed
feat: add spec upgrade cache persistence and improve network state management
1 parent 5d6d156 commit 6d5232d

3 files changed

Lines changed: 317 additions & 243 deletions

File tree

.polkacodes.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
scritps:
2+
format: bun fix --unsafe
3+
check: bun check
4+
rules: |
5+
# React Compiler Rules
6+
1) Keep components and hooks pure
7+
- No side effects during render; make functions idempotent and keep props/state immutable.
8+
2) Follow the Rules of React
9+
- React calls components and hooks. Don’t call component functions directly; render them via JSX.
10+
- Only call hooks at the top level of React functions (never in loops/conditions/nested functions).
11+
3) Let the compiler handle memoization
12+
- Prefer removing most manual `useMemo`, `useCallback`, and `React.memo` unless you have a proven need.
13+
4) Use directives deliberately
14+
- `"use memo"` at the top of a function to opt it into compilation (esp. useful in annotation mode).
15+
- `"use no memo"` as a temporary escape hatch to skip optimization while debugging.
16+
5) Prefer calculations in render over Effects
17+
- Compute derived values during render; use Effects only to sync with external systems (DOM, network, widgets).

0 commit comments

Comments
 (0)