CoNarrative / precept

A declarative programming framework
MIT License
657 stars 33 forks source link

Dispatch sync needed on start #60

Closed alex-dixon closed 7 years ago

alex-dixon commented 7 years ago

Appears there is a race condition between defining the session and mounting the components. Suggest start fn takes a callback as last argument and add dispatch-sync.

Edit: actually might just be trying to insert facts before the session has been swapped into the state atom.

alex-dixon commented 7 years ago

Removed user-provided callback to start! and added one internally with swap-session-sync! (same as swap session but takes callback) dd5b483de49f1ec5028b0d606aa82c0fac154705