Open tianzhich opened 4 years ago
why babel-loader
as dependency is necessary? 🤔
According to storybookjs/storybook#4116, babel-loader
is peerDependencies
of @storybook/react
.
So project using storybook should mark it as dependency.😁
What do you think about to take this an opportunity to expose an inversion of control? https://kentcdodds.com/blog/inversion-of-control
Thinking this is a very specific case and we are just adding much code there
Do you have any ideas here?
Cause react-clap-button is not a fully-controlled component, the count
and countTotal
change depends on internal state.
I think it could be fully controlled if we passed the count
, or countTotal
similarly. And the count
could be defaultCount
accordingly. So increase shows +1 and decrease shows -1.
Then users can implement switch effect if they want.
closes #46