#Default props for a component do not seem to trigger a re-run of useResource$ when tracked.

2 messages · Page 1 of 1 (latest)

thick mantle
#

Hi all. Basically the title. When I was attempting to use default values for props, I noticed that changing these tracked values would not cause useResource$ to re run. Does anyone have a work around for this, or is there something obvious I am missing?

Attached in the text file is a link to a playground instance demonstrating the problem, because the link was too long for discord.

Thanks so much in advance.

solemn hound
#

you may want to try not using default directly in the function arguments then, instead use props.foo ?? defaultFoo where needed and see if that works?