Skip to content

Potentially migrate to setState instead of replaceState #48

Closed
@ethul

Description

@ethul

Currently, replaceState is used in the writeState function.

ctx.replaceState({
state: state
});

However, from the docs, replaceState may be removed in the future.
https://facebook.github.io/react/docs/component-api.html#replacestate

Since the state is wrapped in {state: state} I believe we'd get the same behaviour even though setState does a shallow merge instead of a complete state replacement.

I hope to have a chance to prepare a PR for this. But I wanted to note it down.

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