Coding / Programming Videos

Post your favorite coding videos and share them with others!

Day 9 & 10 on Storybook – Steve Liang – Medium

Source link

OK, since I learned the basics of Storybook, React, and Redux, I would like to do something useful with it. I have been wanting to create a photo component for an e-commerce story for a while. I think I would like to make this component, but this component needs to use GraphQL with AWS backend.

How should photo be access by user? What are the interactions we need to capture in the most basic component? How does it get its data? Can this data source be pluggable? More importantly, there should be two types of Web elements. One is container and two is styling. What is the most fundamental container in Web? Is label the most basic? Or I should be thinking in terms of types or containers for different things. How is a web get built from the most fundamental to more complex element?

I can start by looking at how others have done this before, but it is better if I asked some fundamental questions about the web and go from there. OK, first question, what is the most basic contained of a picture? Is it an archer frame? Let me ask google… Google said use <img> tag. More recently the <picture> tag when loader device is in consideration. OK, I gathered then these tags are like commands telling the browser what to do. It is like calling a function, you can pass parameters along with these tags. JSX feels pretty much the same here. It would appear it does not make sense to ask the question is there more fundamental tag that makes the img or picture tag. That is are there other tags that composed together to make an img tag. This line of thinking don’t seem to apply here.

The w3schools pretty much covers all the tags I would need at this point. If I am to build a basic img component, I can copy what I have done before when learning about storybook. Though that is a good idea because the Storybook guide pretty much layout how to do Component Based Development, the problem is copy and past code would not get me the coding proficiency I am looking for. It is better to code in blind and hack it out and find out where my gaps are. I am sure I won’t fill the gap the first few time making components as these thing takes time to internalize. But that is the approach I should be taking I think.

Source link

Bookmark(0)
 

Leave a Reply

Please Login to comment
  Subscribe  
Notify of
Translate »