Skip to content

Commit 622e18e

Browse files
committed
=== BEGIN fix-signal-text === Fix SignalValue component when using react-transform
1 parent 1c25f17 commit 622e18e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react/runtime/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ export function useSignals(): EffectStore {
145145
* A wrapper component that renders a Signal's value directly as a Text node or JSX.
146146
*/
147147
function SignalValue({ data }: { data: Signal }) {
148-
return data.value;
148+
const store = useSignals();
149+
try {
150+
return data.value;
151+
} finally {
152+
store.f();
153+
}
149154
}
150155

151156
// Decorate Signals so React renders them as <SignalValue> components.

0 commit comments

Comments
 (0)