#Which is the best practice to store a data (singleton service)?

2 messages · Page 1 of 1 (latest)

warped quarry
#

Why do you need a class for that at all? Just make it a value and import it as needed. Imports are only loaded once application wide

raw peak
#

I'd change your loadCars method to use async/await btw. Not sure if that's a concern.