Display relative time as signal
Hi,
I want to display the relative time of a date. I have this file:
but if i run the
relativeTimeFromDates(new Date(2024, 9, 19, 14, 30))
inside of the html part it does not update when a minute more has passed and the output of the function should change. Solid does not react to this. How can i fix this? Do i need to wrap the function in something?
Thanks!5 Replies
There's nothing reactive in any of that code, so how would solid react to it?
How can i make it reactive?
Does the date need to be reactive somehow?
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
Maybe that will get you started. But you really need to read and understand the documentation on how solid works.
Thank you very much!