dsmurl
dsmurl
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
I'm working with a company that is going to do some pilot projects in Solid as an addition to their current React work. So thanks for the help. I'll continue with my soildJs class now. Thanks for the time.
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok I think I get it.
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok cool, so long story short, the root object like person in this case is just kind of different that the sub peices and needs to be understood. That's why it, specifically, has a different behaviour for console.log. And if I want to print the root value of a store like the whole person, then I need to untrack that console.log during debugging?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
would the pointer to name not change?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
what about a produce that sets person.name = {first: "dan", last: 'swan"}?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
I guess person is just the pointer to the store which is a proxy object with all that magic stuff
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok so person isn't a property and doesn't have a signal?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok so only first and last are tracked as signals?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok so first and last are properties and person and name are not. So tracking person will be effected by changes in first?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
is the signal on person and person.name.first the same?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
because person is a complex proxy object? or maybe it's because I'm using 'produce"?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
so I guess the root of the question is, if I use an effect with console.log(person), that registeres the proxy object and when people change something like person.name.first, that effect with be re-fired even though person.name.first isn't referenced in the effect?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok in private window in Brave with no extensions, the proxy object still appears. When I untrack the console log, the effect doesn't refire. When I use the browsers native console.log(person) the effect does refire on change of person.name.first
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ya sure. I'll try.
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ya playground doesn't fire on console.log(person). Locally I get the proxy object. There is a browser screenshot above with an orange button
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
I see the same as you but the person isn't re-fired but does locally. I think you covered this. but can you articulate why, locally, the person effect fires again.
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
ok
82 replies
SSolidJS
Created by dsmurl on 7/3/2023 in #support
Why does effect re-fire? How to use createStore values in effect correctly?
does div with id='last' re-render or react when the button is clicked?
82 replies