Git Product home page Git Product logo

machinate's People

Contributors

pringshia avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

willpan

machinate's Issues

setState() not updating UI as expected

Steps to Reproduce

  1. Launch demo 3
    Locally: cd 03-submachines && yarn start
    Codesandbox: Link
  2. For the second block, click on 'Edit' to transition
    from :
    item-1/Mode: {state: "View", data: 2}
    to:
    item-1/Mode: {state: "Edit", data: 2}
    and so you see an input field.
  3. Open up devtools and grab a reference to the current state by accessing the globally injected machine object
temp = machine.getState()
  1. Save or cancel out of the Edit state by clicking on 'Save' or 'Cancel' for the second block. You should not see the input field anymore.
  2. Reload the prior snapshotted state into the machine.
machine.setState(temp)

Expected Behavior

The app should be reset to having block 2 be in Edit mode with an input field showing

Actual Behavior

The state object, if inspected via machine.getState() does have block 2 as being in Edit mode, but the input field is not visible in the UI.

I suspect this may be due to submachine removal/initialization or dependency removal/initialization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.