Quarkhzv0.0.3
$ npm i @quarkhz/react

//


 Quark.

  1. 01

  2. 02

  3. 03

REACT · setState
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
QUARK · signal
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

·

//

const [n, setN] = useState(0);const n = useSignal(0);<span>{n}</span><sg.span text={n} />onClick={() => setN(n + 1)}onClick={() => n.v++}

//


■

ms
alien-signals161
quark168
reactively213
preact signals1 928
vue reactivity2 420

//

//

//


01

React
Quark
const on = useSignal(false);

<sg.i ext={bindMotion({
  mode: 'active',
  active: on,
  x: spring(0, { stiffness: 260, damping: 18 }),
  variants: { active: { x: 184 } },
})} />
02

React
Quark
<sg.div ext={bindMotion({
  mode: 'progress',
  progress,
  opacity: tween(0, { durationMS: 160 }),
  choreo(root) {
    // step 2: fades in over 0.3…0.65, then stays
    root.seg(0.3, 1).motion({
      opacity: [[0, 0], [0.5, 1], [1, 1]],
    });
  },
})} />
03

React
Quark
const x = useSpring(pointerX, {
  stiffness: 120, damping: 16,
});

<sg.i css={{
  transform: () => `translateX(${x.v}px)`,
}} />

npm i @quarkhz/react-motion

//


01

REACTheader.tsx
const [n, setN] = useState(0);
<Header>
  <Logo /> <Nav /> <Badge n={n} />
</Header>
41
QUARK · sg.*header.tsx
const n = useSignal(0);
<Header>
  <Logo /> <Nav /> <sg.b text={n} />
</Header>
01
02

REACTsearch.tsx
const [q, setQ] = useState('');
const hits = useMemo(
  () => items.filter(match(q)), [items, q]);
<input value={q} onChange={(e) => setQ(e.target.value)} />
6+1
QUARK · computedsearch.tsx
const q = useSignal('');
const hits = useComputed(
  () => items.v.filter(match(q.v)));
<sg.input bind={q} />
00
03

REACTorders.tsx
setOrders((list) => list.map((o) =>
  o.id === id ? { ...o, status } : o));
1 + 1000
QUARK · SignalMaporders.tsx
orders.get(id).status.v = status;
0—
04

REACTfollow.tsx
const [x, setX] = useState(0);
onPointerMove((e) => setX(e.clientX));
<Card style={{ translate: x }} />
~60
QUARK · motionfollow.tsx
const x = useSpring(pointer.x);
<sg.div style={{ translate: x }} />
0

//

$ npm i @quarkhz/core @quarkhz/react

// · USDT

UQC0AE7dCB4mZEguzF5Wl-5vfvgqnqNgTveMVnubVM-Z7JI4