#reasonable JSON:API implementation in solid.js

6 messages · Page 1 of 1 (latest)

bleak wolf
#

There's createResource to handle asynchronous reactivity.

It's basically

const [data] = createResource(() => fetch(url).then(response => response.json()))

Then, data is an Accessor for the resource.

bleak wolf
#

You mean the back end part or something in the front end?

bleak wolf
#

OK, so the question is what you want the front-end to do exactly? Fetch the data from the API and then what?

#

I believe Solid's reactivity should be sufficient for managing all data.

#

You can create a helper function yourself.

#

OK