Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Confused about simpleDataFetch example - no hint of actual implementation #72

Open
cambiata opened this issue Mar 1, 2023 · 0 comments

Comments

@cambiata
Copy link

cambiata commented Mar 1, 2023

As a XState newbie, I'm a bit confused when finding the simpleDataFetch example -
there is no hint at all about how to actually implement actual (real or mock) data fetching:

  • where should the fetch code live? (In the empty services: fetchData method, I guess...)
  • how should I notify the machine about a sucessful fetch request? (sending an RECEIVE_DATA event together with the associated data:Data field back to the machine, I guess...)
  • how should I notify the machine about a data loading error? (No idea, there is no error type event...)
  • how can the Variables type be used? (No idea...)

At least, the simpleDataFetch example should have some commented out implementation example lines to give the user (me!) an idea about how to get some actual data flowing.

Best! / Jonas

@cambiata cambiata changed the title Confused about simpleDataFetch example - no hint of how fetch implementation Confused about simpleDataFetch example - no hint of actual implementation Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant