Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Silent Updates in the State Update Queue #10580

Closed
sebmarkbage opened this issue Aug 31, 2017 · 7 comments
Closed

Implement Silent Updates in the State Update Queue #10580

sebmarkbage opened this issue Aug 31, 2017 · 7 comments
Labels
React Core Team Opened by a member of the React Core Team Type: Feature Request

Comments

@sebmarkbage
Copy link
Collaborator

Reason React has silent updates. Meaning it's a normal update in the state queue that can be reverted. The only difference is, it doesn't need a rerender by itself. If props have changed, it does rerender.

Unclear if we expose this to the existing ClassComponent API or make it a feature of new APIs.

@chenglou
Copy link
Contributor

Thanks for the follow-up. No strong opinion since this is a power-user feature, but for the sake of reactjs itself and the js users, let's keep the API minimal, As always.

Cc @jordwalke

@acdlite
Copy link
Collaborator

acdlite commented Aug 31, 2017

I like the idea of introducing a new component type that serves as a target for both Reason React and for the compiler experiments that @trueadm is doing. We can mark it as unstable for now. This will let us try out new APIs at a faster pace than our usual release cycle. Our ongoing async investigations could also benefit from this.

@acdlite
Copy link
Collaborator

acdlite commented Aug 31, 2017

Or, short of introducing a whole new component type, this.unstable_setSilentState could be sufficient for this case. But it seems like we have several projects that could benefit from an experimental component API surface.

@sebmarkbage
Copy link
Collaborator Author

@acdlite this.unstable_setSilentState wouldn't be sufficient for RR since it's the reducer that determines whether it is silent or not.

@acdlite
Copy link
Collaborator

acdlite commented Sep 1, 2017

Mmm, I see

@acdlite
Copy link
Collaborator

acdlite commented Sep 1, 2017

If I recall correctly, in RR it's determined by the return type?

@gaearon
Copy link
Collaborator

gaearon commented Mar 29, 2022

Looks like this didn't happen nor come up later.

@gaearon gaearon closed this as completed Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React Core Team Opened by a member of the React Core Team Type: Feature Request
Projects
None yet
Development

No branches or pull requests

5 participants