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
When referencing reactivity in the guide and inline docs, we haven't been very consistent with terminology. Recently I have been trying to switch to using two different terms for values in reactive code:
Tracked values are values that track when they have been read. They will add themselves as dependencies to reactive hooks and automatically rerun any reactive hooks that subscribe to them when they are changed. Eg. Signal, ReadOnlySignal, Memo, and Resource are all tracked values, but Effect is not
Reactive hooks are hooks that keep track of dependencies and rerun when the tracked values that are read inside of them change. Eg. use_memo, use_resource, and use_effect are all reactive hooks, but use_signal is not
Reactive Terminology
When referencing reactivity in the guide and inline docs, we haven't been very consistent with terminology. Recently I have been trying to switch to using two different terms for values in reactive code:
Signal
,ReadOnlySignal
,Memo
, andResource
are all tracked values, butEffect
is notuse_memo
,use_resource
, anduse_effect
are all reactive hooks, butuse_signal
is notIt might make sense to switch the two since that seems to align more closely with other frameworks people could be familiar with
Places where we refer to tracked values as reactive today:
dioxus/packages/core-macro/docs/props.md
Line 238 in 19ca707
dioxus/packages/hooks/docs/use_resource.md
Line 112 in 19ca707
dioxus/packages/hooks/docs/derived_state.md
Line 63 in 19ca707
dioxus/packages/core-macro/docs/component.md
Line 225 in 19ca707
dioxus/packages/core/docs/reactivity.md
Line 67 in 19ca707
dioxus/packages/hooks/src/use_reactive.rs
Line 103 in 19ca707
The text was updated successfully, but these errors were encountered: