One of the best ways to learn React is by creating reusable components. Instead of using bootstrap or other frameworks when working with Grid layout, why donโ€™t make it yourself?

In this tutorial, I am going to show you:

  • Set up create-react-app with typescript template
  • Create a simple Box component
  • Create a Reusable Grid Component using Flexbox
  • Create Grid Ruler using CSS Grid
  • Handle Responsiveness in Grid Layout
  • Add dynamic props JustifyContent and AlignItems
  • Set up storybook
  • Write Grid Document in storybook
  • Deploy storybook with Netlify

What you will learn in this tutorial:

React - https://reactjs.org/
Typescript https://www.typescriptlang.org/docs/
Flexbox and CSS Grid
SCSS https://sass-lang.com/documentation + CSS modules
Storybook https://storybook.js.org/
Netlify https://www.netlify.com/

We are going to use Netlify to deploy and host our storybook
Demo

๐Ÿ Source code: Grid React Component

๐Ÿ“ Text Editor: https://code.visualstudio.com/
Plugin:

  • Prettier
  • ESLint
  • Auto Import

#react #typescript #javascript #web-development #css

Complete tutorial - Grid component with React + Typescript + Storybook + SCSS
6.65 GEEK