Skip to content

Conversation

@zarabotaet
Copy link
Member

Two different workarounds in two commits

@netlify
Copy link

netlify bot commented Dec 9, 2020

👷 Deploy request for effector-docs pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: b404282

@zarabotaet zarabotaet changed the title Fix/use store Fix/useStore Dec 9, 2020
@zarabotaet
Copy link
Member Author

Because useState is a wrapper around useReducer we can directly take useReducer.
https://codesandbox.io/s/hopeful-lovelace-qeufx?file=/src/App.js
Sandbox to play with the proposed solution.

@zarabotaet zarabotaet marked this pull request as ready for review December 29, 2020 21:56
@zerobias zerobias self-requested a review December 30, 2020 17:01

const Display = () => {
const store = useStore($store)
fn()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a proof that issues does exists at all: your example reveal that current implementation works as expected

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@zerobias zerobias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, big thanks 👍 👍

@zerobias zerobias merged commit 6c2d143 into effector:master Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants