Skip to content

refactor: ward off evil s#1465

Merged
marvinhagemeister merged 6 commits into
preactjs:masterfrom
mochiya98:m98-refactor-e
Apr 22, 2019
Merged

refactor: ward off evil s#1465
marvinhagemeister merged 6 commits into
preactjs:masterfrom
mochiya98:m98-refactor-e

Conversation

@mochiya98

Copy link
Copy Markdown
Contributor

booyah!! ✨
fixes #1461

Comment thread test/browser/lifecycle.test.js Outdated
@coveralls

coveralls commented Mar 27, 2019

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling d0e32f2 on mochiya98:m98-refactor-e into 8c48a8f on developit:master.

Comment thread src/diff/index.js Outdated
@mochiya98

Copy link
Copy Markdown
Contributor Author

Thank you for the review, I will reconsider. 🚀

@mochiya98 mochiya98 closed this Mar 27, 2019
@developit

Copy link
Copy Markdown
Member

@mochiya98 this looks promising! Should be able to swap out the setState() call for just setting .state=.

@mochiya98 mochiya98 reopened this Mar 27, 2019
@mochiya98

mochiya98 commented Mar 27, 2019

Copy link
Copy Markdown
Contributor Author

I fixed the mistake.
@developit thanks! I'm using setState() to process _nextState.

Comment thread src/diff/index.js
@mochiya98

Copy link
Copy Markdown
Contributor Author

Any updates on this?

@JoviDeCroock JoviDeCroock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me, thanks for working on this @mochiya98. I'm going to wait for another maintainer to voice an opinion but great work already 💯

@mochiya98

Copy link
Copy Markdown
Contributor Author

Is there any problem? I can help if you need.

@marvinhagemeister marvinhagemeister left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome 🎉 This PR even removes 11 B from our gzipped size. This is presumably because _nextState is compressed better due to more occurrences 💯

Sorry that it took this long to get merged.

@marvinhagemeister marvinhagemeister merged commit 9edba30 into preactjs:master Apr 22, 2019
@mochiya98

Copy link
Copy Markdown
Contributor Author

Great work, thanks for all reviewers! 👍

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.

[10.0.0-alpha.2] - setState() doesn't apply state when called within componentWillMount

5 participants