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

Reverse hook order for all but onbeforeupdate #2297

Merged
merged 2 commits into from
Nov 27, 2018

Conversation

dead-claudia
Copy link
Member

Description

Call attrs hooks before component hooks

  • Drive-by: onbeforeupdate prevents subtree redraw if either hook returns false, not both.

Motivation and Context

Fixes #2270.

How Has This Been Tested?

Updated tests appropriately

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated docs/change-log.md

@dead-claudia dead-claudia requested a review from pygy as a code owner November 14, 2018 06:12
@dead-claudia dead-claudia added Type: Bug For bugs and any other unexpected breakage Type: Breaking Change For any feature request or suggestion that could reasonably break existing code labels Nov 14, 2018
@dead-claudia dead-claudia added this to the 2.0.0 milestone Nov 14, 2018
- Drive-by: `onbeforeupdate` prevents subtree redraw if *either* hook
  returns `false`, not *both*.
@dead-claudia
Copy link
Member Author

dead-claudia commented Nov 21, 2018

Ping @barneycarroll: I know you were involved in the discussion, so could you take a look at this?

Copy link
Member

@barneycarroll barneycarroll left a comment

Choose a reason for hiding this comment

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

Nice @isiahmeadows

@dead-claudia dead-claudia merged commit a8473e6 into MithrilJS:next Nov 27, 2018
@dead-claudia dead-claudia deleted the hook-order-fix branch November 27, 2018 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Change For any feature request or suggestion that could reasonably break existing code Type: Bug For bugs and any other unexpected breakage
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Attrs hooks should always be called *after* component hooks
3 participants