SeanAye
SeanAye
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
thanks for all your help!
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
so if it is the signal variant it will be reactive and if it is the static variant it wont
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
In leptos you need to be explicit about props being reactive or not https://docs.rs/leptos/latest/leptos/enum.MaybeSignal.html
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
its based on solid
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
I'm coming from leptos where this doesn't happen in quite the same way
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
ok yea yea I got it, sorry that took me a second
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
so you don't need to litter the types with Accessor everywhere
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
so even when you unwrap signal in parent the child value remain reactive as long as you dont destructure
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
ohh ok I understand
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
but since I dont care about reactivity this seems unnecessary
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
this is "unwrapping" the signal, subscribing in the child
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
If I change the prop to a signal then I need to do this in the child
export function EditS3ConfigForm(props: { initialForm?: Accessor<AlreadyExistingForm> }) {
console.log(props);
const [form, setForm] = createStore(props.initialForm?.() ?? defaultState);
export function EditS3ConfigForm(props: { initialForm?: Accessor<AlreadyExistingForm> }) {
console.log(props);
const [form, setForm] = createStore(props.initialForm?.() ?? defaultState);
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
I'm not sure I follow
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
so unwraping the signal in child is not required
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
Yea that makes sense in most contexts but in this case I dont care about the value after the initial render
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
ah right
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
or you mean each primitive in the obj is a prop
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
pass by value like clone the object? all objects are pass by reference I thought
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
thanks!
59 replies
SSolidJS
Created by SeanAye on 12/1/2023 in #support
show is rendering children when still falsy
oh I see
59 replies