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

Fixed lifecycle twice executing (close #1742) #1983

Merged
merged 2 commits into from
Oct 11, 2017

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Oct 6, 2017

What I did

Fixed #1742

How to test

$ yarn bootstrap --core
$ yarn link
$ cd apps/vue
$ yarn link
$ cd ../../examples/vue-kitchen-sink
$ edit src/stories/Button.vue

add the below created hook:

created() [
  console.log('call created hook');
}
$ yarn run storybook

On the browser, the below actions

  • open inspect panel of devtools
  • select console tab
  • rounted Select [Button] of manager panel on Storybook
  • page reload storybook page

After that, in the output of the console, output call created hook once only

@kazupon kazupon added the vue label Oct 6, 2017
@codecov
Copy link

codecov bot commented Oct 6, 2017

Codecov Report

Merging #1983 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1983   +/-   ##
=======================================
  Coverage   21.34%   21.34%           
=======================================
  Files         262      262           
  Lines        5767     5767           
  Branches      696      705    +9     
=======================================
  Hits         1231     1231           
+ Misses       4005     3987   -18     
- Partials      531      549   +18
Impacted Files Coverage Δ
app/vue/src/client/preview/render.js 0% <ø> (ø) ⬆️
lib/ui/src/modules/ui/libs/hierarchy.js 48.8% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/down_panel.js 23.52% <0%> (ø) ⬆️
app/react/src/client/preview/error_display.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/routes.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/types/Boolean.js 11.62% <0%> (ø) ⬆️
addons/info/src/components/Node.js 39.7% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/layout.js 12.5% <0%> (ø) ⬆️
.../ui/src/modules/ui/components/layout/dimensions.js 15.62% <0%> (ø) ⬆️
.../ui/src/modules/ui/components/left_panel/header.js 29.62% <0%> (ø) ⬆️
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dde82cf...baddc70. Read the comment docs.

@kazupon kazupon changed the title 🐛 bug(vue): fixed lifecycle twice executing (close #1742) Fixed lifecycle twice executing (close #1742) Oct 9, 2017
@@ -67,6 +67,8 @@ export function renderMain(data, storyStore) {
// https://github.com/storybooks/react-storybook/issues/81
previousKind = selectedKind;
previousStory = selectedStory;
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Is this not also a valid change for react? totally guessing here.

either way this PR is good to merge, as it addresses a very nasty bug for Vue users!

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, In the Vue, occure the similar issues.

@kazupon kazupon merged commit b61c3df into storybookjs:master Oct 11, 2017
@kazupon kazupon deleted the fixes/issue-1742 branch October 11, 2017 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants