• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microstates / microstates.js / 1534
99%

Build:
DEFAULT BRANCH: master
Ran 03 Nov 2018 12:40AM UTC
Jobs 1
Files 20
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1534

push

travis-ci

web-flow
Store should allow destructuring microstates (#263)

## Fully retrieve the current microstate at an Id's location.

Previous to the move to femtostates refactor, an Id stored a reference
to a Type and a path. In effect, a pointer into the "current"
microstate. When performing a transition, we looked up the
corresponding microstate on which we want to make the transition,
starting at the root.

In this way, the microstates could vary freely, but the ids would
remain stable.

With the move to femtostates, there was no `At` lens implementation for a
microstate, and especially Array objects, so there was no way to do a
`view` on a microstates from the top level down to the location where
the transition was happening. So we opted for a pathmap which kept a
mapping of the Id to its microstate that was updated every time a path
changed.

This was a fatally flawed approach since logically _every_ microstate
in an entire tree changes its value on _every_ transition. Because
microstates were stored at their ids location only when that id was
navigated to, we were seeing all destructured references becoming
stale on every transition.

This workaround re-introduces the approach of looking up the
corresponding microstate from the root of the tree with every
transition. It's a bit hacky because there is no `At` implementation
for array microstate, so we have to do what _would_ happen if we did.

This is a proof of concept for the issue, but a more elegant solution
exists if we re-introduce polymorphic lenses. Then, we can have a
conatiner implementation for array microstate, and so we can lookup
substates using a generic lens implementation.

* Fix lint error

168 of 224 branches covered (75.0%)

Branch coverage included in aggregate %.

387 of 391 relevant lines covered (98.98%)

1051.76 hits per line

Jobs
ID Job ID Ran Files Coverage
5 1534.5 03 Nov 2018 12:40AM UTC 0
90.24
Travis Job 1534.5
Source Files on build 1534
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1534
  • af41ee77 on github
  • Prev Build on master (#1527)
  • Next Build on master (#1539)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc