Skip to content

Async Updates #10

@objectliteral

Description

@objectliteral

Currently, all updates to values in the store happen synchronously.

While this leads to mostly predictable behavior overall, I feel like updates should happen asynchronously. This is mostly for performance reasons.

I think, React developers don't expect updates to happen synchronously and usually won't depend on that. Asynchronous data flows and state updates are so common in the React ecosystem that they probably won't irritate developers.

Implementation

One question regarding the implementation is, whether fleux should start returning promises or use the new async/await stuff or neither.

Should there be a way to somehow force synchronicity? I lean towards no.

As a consequence of this change, some tests will need to be updated that check against state updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions