Excellent video! Love your content, very clear, precise and straight to the point. For readers, something not mentioned in the video is that the “args” object can also be specified in the export default object (above const Template) and it would apply to all exported stories (the ones below const Template), reducing the need to repeat the same, common args values in each story variation.
by that you mean you would only repeat the arguments that you wanna change? as in, for example: specify args object inside the export default with backgroundColor: "red" and then only specify it again where you actually do need a different color?
No way! You read my mind or something. At work they told me on Thursday to look into Storybook, we will start implementing it soon. And just like that you release a video about it, unbelievable!
I highly recommend this video tutorial. This is easily the best video or even tutorial to start learning React Storybook with! I have followed along and code the 2 components. Through it, I have learnt so much. When I read up other tutorials and the official documentation, the concepts just fit like a puzzle.
Thank you for a short video with just enough information to get started, I don't need a 6 hour course with the history of react and storybook. This is perfect, keep up the good work
Our component design team mandated everybody start using this and.... the Storybook web site does an atrocious job explaining either how to really use Storybook, or the benefits thereof. To that end, thanks for the video.
Thank you 🙏 I use storybook at work. It’s really helpful to understand the project. When you need to understand what this component does, just check your storybook. I liked your video so much. I hope you can make more videos about it. See you
WDS has the highest value-per-minute of any web tech channel! This intro to not only informs me but actually motivates me to use Storybook! Outstanding work. Thanks.
For anyone else wondering what is going on at 13:28 when he's iterating over numberOfChildren. I went into the docs and also tested it on the console to figure. it out: 1. defaultValue is just a standard field built into Storybook and is used as a key for a value: storybook.js.org/docs/react/api/argtypes#gatsby-focus-wrapper 2. Starting from the outside, he's spreading values into an array, that's the brackets and the 3 periods aka [...] 3. The values he's spreading into the array above come from the Array(numberofChildren).keys(). I'll explain in two parts. Part 1: we've got an empty array created with a maximum limit of 4 values, that's Array(numberOfChildren) Part 2: that array is then counted out using the keys() function. As stated in MDN, this function returns "An array of strings that represent all the enumerable properties of the given object." Since the array returned from Part 1 was empty, this just counts out the number of indexes (0, 1, 2, 3). 4. As a result, this expression [...Array(numberOfChildren).keys()] returns an array that is [0, 1, 2, 3] 5. When he iterates over it that, the values being passed as "n" are 0, 1, 2, and 3. That explains why he adds a 1 to each value within the brackets {n + 1} Hope that helps!
Hey, sorry can you help me with a problem related to this? Im trying to do exactly the same as the example of the wrapper component with the argTypes numberOfChildren, but with TypeScript. The problem is that i cannot pass numberOfChildren to my template function throwing an error which says "numberOfChildren does not exist in (my component props)"... And indeed thats true, but thats the point of this example, to use an argtypes that originally does not exist in the component props. I don't know what i'm doing wrong and because i'm new to TS I also don't know how to specify the correct StoryBook Type for fix the error because is not inferring the argtype automatically and after digging in the docs / stack / google for hours im still stuck in this because all the examples that i find with TS only cover the case that the argType exist in the component props. Thanks.
Brother you are the truth. I was gonna buy coding phase course on storybooks an this video hit the spot for me. Man thank u for this info u save me money 💰 🤑 💸 lol
After watching whole playlist from another youtuber, now I can say that I can keep up with Kyle's teaching speed and understand all of this storybook video haha, thanks Kyle
Thank you, great explanation. I am a beginner in SB and React. I just created my first app in react and installed my Sb. Your instructions were helpful. I could not catch up with the speed you created all the components in your story book, because I still have to master js. Great video though! Good for those who already know the js. I have to use typescript.
Can't believe that were 17 minutes! Great style of explanation! I appreciate that you speak relatively fast, even as a non-native it was just perfect to follow along. Hallo but where
Storybook is a cool package) But there are some cases when we don’t need all the power of storybook, but just a simple “test page” with all our components where we can play with its props. There is one package that works just fine for this, called storybox-react
After I've finished creating the horizontal Stack story at 15:30, the 'defaultValue: 4' argType hasn't pulled through to StoryBook. In Storybook it just has 1 red box and it asks me to set the number manually from the Controls section. Has there been an update to the defaultValue argType which explains why this has happened?
Appreciate this overview. I sorta wish the child component had been broken into a 2nd video and some use case examples were provided. Why would we ever want stacks of buttons in a UI scenario? Maybe taking the time to provide more context and showing use cases for advanced scenarios would be more helpful. Felt a little intense in the last minutes of the video cramming detail
... but in the example I don't like the idea of setting a color property because It may he difficile to adapt afterwards for dark mode or color blindness. I prefer to associate semantics to a component like "strong", "alert", "warning*, "validate", "reset", "update", "apply", "cancel*, and so on and so forth. Then telling that the "alert" behaviour leaf to white text on red background, to red button with some fancy shadow, can be done with CSS.
this is so informative, but also this is the first time I'm using the playback of slowmo in youtube cause sometimes you talk so fast, otherwise super great video!
this is great video. but I still do not understand what to do with this storybook?? in real project we have various UI and we use various component libraries. how storybook is helping in that? what is the use of creating such button.stories.js??
Here's a tip [Array(numberOfChildren).keys()].map ((n) => (JSX) ) might not work for some of you as this does not produce index of array in new ES's rather (Array.from(Array(numberOfChildren).keys())).map((n) => (JSX) ) has to be the new style. Thank me later.
It is very explicit, thank you! But how to use it in my app? Do I need just to import the story Component and work with it like with a simple Component?
This guy's a perfect juxtaposition of "nerd" and "chad" and I don't even know how he manages it
its the hair
He's a CHARD!
step 1: be a handsome white male
step 2: teach geeky stuff on youtube
hahahaha
he's competent. that's all that matters. He's young and that we all had. When age fades he can still be competent. Good job in your videos.
I've used storybook for 2 years at 2 different companies. It's awesome
Excellent video! Love your content, very clear, precise and straight to the point.
For readers, something not mentioned in the video is that the “args” object can also be specified in the export default object (above const Template) and it would apply to all exported stories (the ones below const Template), reducing the need to repeat the same, common args values in each story variation.
by that you mean you would only repeat the arguments that you wanna change? as in, for example: specify args object inside the export default with backgroundColor: "red" and then only specify it again where you actually do need a different color?
@@VacaAlpha Yeah. You only specify it again when you actually need a different default color for that one particular story.
That’s exactly what I needed to get started with the Storybook. Thanks a lot, you are doing a great job 👏
No way! You read my mind or something. At work they told me on Thursday to look into Storybook, we will start implementing it soon. And just like that you release a video about it, unbelievable!
God works in mysterious ways buddy
@@emgodas Amen!
This is a perfect Storybook walkthrough... I am pretty confident to start this new role. Thank you
I highly recommend this video tutorial.
This is easily the best video or even tutorial to start learning React Storybook with! I have followed along and code the 2 components. Through it, I have learnt so much.
When I read up other tutorials and the official documentation, the concepts just fit like a puzzle.
Storybook is great! I love using it with tsdx to create component modules.
Thank you for a short video with just enough information to get started, I don't need a 6 hour course with the history of react and storybook. This is perfect, keep up the good work
thanks for your movies. I used to watch them during my bootcamp, when i wanted to become Dev. And I still watch them as they are useful at work :)
.hair {
position: fixed;
}
to the point tutorial
now I am confident enough to write storybook in my cv
Our component design team mandated everybody start using this and.... the Storybook web site does an atrocious job explaining either how to really use Storybook, or the benefits thereof. To that end, thanks for the video.
Thank you 🙏 I use storybook at work. It’s really helpful to understand the project. When you need to understand what this component does, just check your storybook. I liked your video so much. I hope you can make more videos about it. See you
WDS has the highest value-per-minute of any web tech channel! This intro to not only informs me but actually motivates me to use Storybook! Outstanding work. Thanks.
thats the main thing i like about this channel. Thanks WDS
Perfect timing! Already liking storybook a lot thanks to your super condensed and helpful crash course 👋👌🤩
man, I am back to your video to try. Now I understand how to do this. Fast and to the point.
Thank you.
For anyone else wondering what is going on at 13:28 when he's iterating over numberOfChildren. I went into the docs and also tested it on the console to figure. it out:
1. defaultValue is just a standard field built into Storybook and is used as a key for a value: storybook.js.org/docs/react/api/argtypes#gatsby-focus-wrapper
2. Starting from the outside, he's spreading values into an array, that's the brackets and the 3 periods aka [...]
3. The values he's spreading into the array above come from the Array(numberofChildren).keys(). I'll explain in two parts.
Part 1: we've got an empty array created with a maximum limit of 4 values, that's Array(numberOfChildren)
Part 2: that array is then counted out using the keys() function. As stated in MDN, this function returns "An array of strings that represent all the enumerable properties of the given object." Since the array returned from Part 1 was empty, this just counts out the number of indexes (0, 1, 2, 3).
4. As a result, this expression [...Array(numberOfChildren).keys()] returns an array that is [0, 1, 2, 3]
5. When he iterates over it that, the values being passed as "n" are 0, 1, 2, and 3. That explains why he adds a 1 to each value within the brackets {n + 1}
Hope that helps!
Hey, sorry can you help me with a problem related to this? Im trying to do exactly the same as the example of the wrapper component with the argTypes numberOfChildren, but with TypeScript.
The problem is that i cannot pass numberOfChildren to my template function throwing an error which says "numberOfChildren does not exist in (my component props)"... And indeed thats true, but thats the point of this example, to use an argtypes that originally does not exist in the component props.
I don't know what i'm doing wrong and because i'm new to TS I also don't know how to specify the correct StoryBook Type for fix the error because is not inferring the argtype automatically and after digging in the docs / stack / google for hours im still stuck in this because all the examples that i find with TS only cover the case that the argType exist in the component props. Thanks.
Omg, I didn't catch it at first.
You rocks!
Thanks for the explanation.
@@yerkoacuna5037 have you solved it? Im curious about how to fix it, maybe creating an interface and passing it to the object?
Brother you are the truth. I was gonna buy coding phase course on storybooks an this video hit the spot for me. Man thank u for this info u save me money 💰 🤑 💸 lol
After watching whole playlist from another youtuber, now I can say that I can keep up with Kyle's teaching speed and understand all of this storybook video haha, thanks Kyle
I had to learn this for my job and you explained Storybook so well. Great tutorial!!!!!😊👍🏽
Thank you for the simplified explanation! It was easy to understand and still interesting. Great tutorial! :)👏🧠
Looks good, I can't wait for the day these types of tutorials use typescript by default
Thank you, great explanation. I am a beginner in SB and React. I just created my first app in react and installed my Sb. Your instructions were helpful. I could not catch up with the speed you created all the components in your story book, because I still have to master js. Great video though! Good for those who already know the js. I have to use typescript.
Can't believe that were 17 minutes! Great style of explanation! I appreciate that you speak relatively fast, even as a non-native it was just perfect to follow along. Hallo but where
Finally found perfect video to understand the video. Good work bro
is just me or this chanel is the best ever!!!. thanks Kyle for this video
Kyle I have learned so much from you. Thanks man... Thanks ❤
Finally a Storybook tutorial that works!
you are amazing!!! THANK YOU FOR TEACHING AND PLEASE UPLOAD MORE VIDEOS
Nice timing! I read up quickly on storybooks a month ago and forgot about it. Will be fun to watch this and test some of it myself :D
Thanks you. Now i have much more the concept storybook
Storybook is a cool package) But there are some cases when we don’t need all the power of storybook, but just a simple “test page” with all our components where we can play with its props. There is one package that works just fine for this, called storybox-react
🤲🤲
bro you are a godsend
Excited for this one! Thanks for the video!
After I've finished creating the horizontal Stack story at 15:30, the 'defaultValue: 4' argType hasn't pulled through to StoryBook. In Storybook it just has 1 red box and it asks me to set the number manually from the Controls section. Has there been an update to the defaultValue argType which explains why this has happened?
Ty bro amazing explanation, i learned too much also with the proptypes video, ty !
Appreciate this overview. I sorta wish the child component had been broken into a 2nd video and some use case examples were provided. Why would we ever want stacks of buttons in a UI scenario? Maybe taking the time to provide more context and showing use cases for advanced scenarios would be more helpful. Felt a little intense in the last minutes of the video cramming detail
So storybook is a way to describe customized web component's ? I didn't know this tool, great discovery !
... but in the example I don't like the idea of setting a color property because It may he difficile to adapt afterwards for dark mode or color blindness.
I prefer to associate semantics to a component like "strong", "alert", "warning*, "validate", "reset", "update", "apply", "cancel*, and so on and so forth.
Then telling that the "alert" behaviour leaf to white text on red background, to red button with some fancy shadow, can be done with CSS.
Thanks for the great video, really clear view to the Storybook.
It's my perception, or did you increased the speed slightly? 👍
Makes more sense to put the story file right next to the component
Thank you
This is great explaining and sample to start with storybook
Aaaand I just got started on Storybook during an Uber ride. You're awesome, Kyle! Thank you! 💯
Great video! High tempo yet easy to follow
great !
simple and short
That is so strange, exactly when i need, these weeknds!!
CAN YOU MAKE ANOTHER ONE LIKE THIS BUT USING VITE, (not deprecated CRA)? im struggling changing buttons sizes on the browser, it doesnt function
Man this is awesome thank you so much!!!
I like this guy, he's quite realistic for an alien lizard.
Very clear explanation. Thank you!
Thank you!!
thanks for this awesome tutorial
This guy is defeating Dev Ed too
Thank you, it's perfect!
Hey bro you are excellent person, you are the one with whom i learned coding. #kyle #WebDevSimplified
the same here, a year ago
@@jotasenator yeah he is excellent
Thank you :)
Excellent video, thanks Kile
great tutorial thank you so much !
Great but it would be nice to add a little bit about snapshot (integration) testing in Storybook!
Great tutorial
thank you
the suitable video at the suitable time
this is so informative, but also this is the first time I'm using the playback of slowmo in youtube cause sometimes you talk so fast, otherwise super great video!
very help full
Thank you for this video
OMG 100% quality contents
Please, tutorial for backend development
Awesomeeeeee!!
Thumb before watch, trust me!
How about Nest Js crash course video
I second this!
Awesome
started from the middle
thank you man:)
Hey there, Can you do a video on how Storybook uses Design Tokens and interacts with Figma for a bridge between the 2 teams??
this is great video. but I still do not understand what to do with this storybook?? in real project we have various UI and we use various component libraries. how storybook is helping in that? what is the use of creating such button.stories.js??
nice vid thanks i learnt a lot
Great video
How do we actually use these components in a project?
Awesome 🖤🖤
What a nice video! Please try to go around GraphQL in the future C:
Excellent tutorial, but please can you slow down you speaking ratio so we can follow up with you :D.
Thank you very much
When you create stories at 10:06 how do you use those buttons in your component ?
god level video, i was looking fot this
i like to meet you someday
Now this is interesting
Nice crash course!
can you make a video on how to use webpack with react.
I always thought propTypes was just referring to a typescript interface/type. Didn't realize it could be used in js
Nice intro... Keep them coming my friend
great
GoodJob!
can you do a video about how we can hide accesstokens in client side
Here's a tip
[Array(numberOfChildren).keys()].map ((n) => (JSX) ) might not work for some of you as this does not produce index of array in new ES's
rather
(Array.from(Array(numberOfChildren).keys())).map((n) => (JSX) ) has to be the new style.
Thank me later.
Hi sorry, what does this code does?
Really awesome. How caould I publish the components that I use to npm?
In TS i have 'numberOfChildren' is missing in props validation
Hey! Great video! Thanks. Can you make one for storybook with angular?
How can we type the advanced example shown in TypeScript, when i tried to add numberOfChildren ts yells
Please make video on react konva js
My all team mates are waiting for your video on konva because it is tough to understand
05:57 Props
For me, `npx sb init` didn't work, but `npx storybook init` did, in case anyone else runs into the same issue :)
It is very explicit, thank you!
But how to use it in my app?
Do I need just to import the story Component and work with it like with a simple Component?