Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix broken example in the README.md#92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
boazberman wants to merge1 commit intodevelopit:master
base:master
Choose a base branch
Loading
fromboazberman:master

Conversation

@boazberman
Copy link

In the example store.setState was called with what could be a stale state. In order to use the current state, one must call store.getState. Similar to how in React if you call setState without a callback it is a potential bug.

In the example store.setState was called with what could be a stale state. In order to use the current state, one must call store.getState. Similar to how in React if you call setState without a callback it is a potential bug.
@boazberman
Copy link
Author

boazberman commentedJun 16, 2018
edited
Loading

I've spent a lot of time searching for this API, and only found it in thedeclaration file.
If I'm mistaking for it's need, I would be more then grateful to learn.

@developit
Copy link
Owner

I believe there's another example that shows the getState() version - perhaps we'd be better off showing a synchronous function for this example? I just wanted to have a way to show both.

@boazberman
Copy link
Author

Well, my difficulty was that I just could not understand how one can manipulate the state object after an async operation happened, and expect the results to be valid, as the state could change during that period, but the state object being manipulated is the old state. If you think there is no need in this example I understand, I just though it will save some people from having bugs caused by an asynchronous behavior. Thanks!

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@boazberman@developit

[8]ページ先頭

©2009-2025 Movatter.jp