state() starts with another state()
The message
MARKLESS_STATE_NESTED_CREATION: `<initSource>` declares graph state whose initial value is another state() call. `<name>` cannot store graph state as its value.
A graph cell serializes plain data across the resume boundary; a state() call declares a cell and has no serializable value form.
Before: `const x = state(state(5));` — After: `const x = state(5);`.
MARKLESS_STATE_NESTED_CREATION: `<initSource>` creates a computed whose value would be another <nestedApi>() call. `<name>` derives a value; it cannot derive graph nodes.
<nestedApi>() declares a graph node at compile time; it has no runtime value form that a cell or derive result can hold.
Derive the value directly — before: `const outer = computed(() => computed(() => count));` — after: `const outer = computed(() => count);`.
https://markless.dev/errors/MARKLESS_STATE_NESTED_CREATIONWords in angle brackets change from case to case.
Why
The start value of state() must be plain data. Another state() call is not data.
Fix
Pass the plain start value.
const x = state(5);