github statelyai/xstate @xstate/store@3.6.0

7 months ago

Minor Changes

  • #5266 42bfd0a30d74e1c5820728220a00db692023f1f8 Thanks @davidkpiano! - Added async atoms:

    const atom = createAsyncAtom(async () => {
      const response = await fetch(`/api/something`);
      return response.json();
    });
    
    atom.subscribe((state) => {
      // Status can be 'pending', 'done', or 'error'
      if (state.status === 'done') {
        console.log(state.data);
      }
    });

Don't miss a new xstate release

NewReleases is sending notifications on new releases.