SolidJSS
SolidJSโ€ข3y agoโ€ข
5 replies
romanobro

cant access global signals inside onMount?

Hello, I want to set a list of notes to contain the data inside an async fetch request. To do this, I want to fetch the data on page mount, then use that data to fill the notes signal. But, this is causing an error and I do not know why. The error message is "cannot access 'notes' before initialization", but I thought that the notes signal would be initialized first. Thank you
Screen_Shot_2023-05-10_at_7.26.49_PM.png
Screen_Shot_2023-05-10_at_7.27.07_PM.png
Was this page helpful?