Replies: 1 comment
|
So I didn't answer my own question exactly, but I found another way to do what I wanted -- instead of using function MyComponent(props) {
const [a, b, c] = props.initialValues ? parseValues(props.initialValues) : [0, 0, 0];
const [one, setOne] = createSignal(a);
const [two, setTwo] = createSignal(b);
const [six, setSix] = createSignal(c);
}I also found out that another effect wasn't handling the undefined previous value of its first call, which also contributed to my trouble. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is is possible to get
onMountto run before all other effects?What I'm trying to do is set a few signals with some initial values on a component via props -- these initial values might change over time. This component is nested inside a
<Show>tag and seems to be created every time it is shown - which is fine, but some of the other effects in the component are running beforeonMountand thus messing up the initialization I'm going for.All reactions