Make the child of a memoized component reactive
I have this in a parent:
And this is RelativeTime:
Basically I want to take a memoized value and keep chaning the child component to show the current relative time. Is this possible?
3 Replies
It looks like this fixes it.
Change this:
return currentMillis();
To this:
return <>{currentMillis()}</>;
Jep. Now you have JSX as return.
Otherwise you could also just
Without the brackets. Then you would be returning a function which would also be reactive.
"Without the brackets. Then you would be returning a function which would also be reactive."
This makes this make sense. Thanks!