Skip to content

nardi/pobx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PobX

Automated state management using transparent reactive programming constructs. A clone of MobX and built using RxPy.

This project is just getting started. The aim is to follow the API and semantics of MobX as closely as possible. The following core functionality has ben implemented (but likely not very robustly):

  • observable (for class members)
  • observable.box (for values)
  • computed (also computedproperty for properties)
  • autorun
  • action
  • run_in_action

See tests and the MobX documentation for examples of usage.

Next up:

  • observable decorator for entire classes. Maybe also for existing objects?
  • Can computedproperty be absorbed into computed?
  • Is there a sensible way to deal with IO (e.g. asyncio)?
  • Typing.
  • Handling errors properly.
  • How to ensure subscriptions to observables are automatically terminated at an appropriate time? E.g. when calling computed in an observing function (example from MobX).
    • This is now taken care of a bit better: subscriptions are now disposed if they are no longer listened to after (re)running an autorun function. Moreover, computed values are not recomputed if no one is listening.
  • Documentation and intelligible code ;)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published