SolidJSS
SolidJSβ€’16mo agoβ€’
7 replies
gsoutz

What is wrong with Math.random create Signal

This code:
const [name, set_name] = createSignal(`Guest ${Math.floor(Math.random() * 10)}`)

produces different values on interface and in createEffect log, what is going on?
Was this page helpful?