SkipLabs / skip

Skip is a framework for building reactive services
https://skiplabs.io
MIT License
152 stars 10 forks source link

Pass object to use external resource #408

Closed pikatchu closed 2 weeks ago

pikatchu commented 2 weeks ago

Refactor useExternalResource to take an object as a parameter.

The idea is that this:

useExternalResource({ supplier: "foo", resource: "rname", params: ... })

Is more readable than:

useExternalResource("foo", "rname", ...)
mbouaziz commented 2 weeks ago

I feel like non-object would be much less of an issue if the supplier was a well-typed object rather than a string. I haven't dug in the new API yet to suggest something specific