Skip to content

Allow states with dynamic elements, e.g. a router #10

Description

@patrickgwsmith
const songID = Symbol();
yield path(['song', songID]);

Activity

  1. patrickgwsmith commented on Sep 16, 2021

    @patrickgwsmith
    ContributorAuthor

    Could allow State to be represented a URL or JSON tuple/object. This could turn into support for serialising and deserialising the current state.

  2. patrickgwsmith commented on Sep 16, 2021

    @patrickgwsmith
    ContributorAuthor
    machine.current; // { song: 123 }
    musicURLFromState(machine.currentURL); // "/song/123"
    machine.jump({ song: 456 });
    
    machine.current; // { song: 456 }
    musicURLFromState(machine.currentURL); // "/song/456"
    machine.jump(musicStateFromURL("/song/789"));
    machine.current; // { song: 789 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions