Skip to content

how can I handle the situation that the storageRequest value depending on previous state #20

Description

@lujiajing1126

In redux, we can get the current state in reducer

how can i get the current state in cycle.js app with storage where i store the state of app

now i can get the current state by

const storageRequest$ = xs.combine(newScreen$.startWith(null),deleteScreen$.startWith(null)).map(([newOne,delOne]) => {
    return state$.map(row => { // where to create a request }
}

but state$ is depend on the storage input stream conversely, so there's circular dependenies

How can i solve this problem ( maybe it' s a flaw of my design pattern )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions