I made my first React Component! ⚛️

I created a Grid Component.

It accepts an array of arrays in order to structure the cells inside of it, and it automatically resizes to be as big or as small as I need it to be. The cells can contain anything, even other grids!

This is what using the grid looks like in React:

<Grid cells={THE_ARRAY_OF_CELLS_GOES_HERE}/>

It outputs a table, which is great because coding what you see below by hand in HTML is the very definition of hell 🔥.

a react component that consists of a 3 by 3 grid that cointains other 3 by 3 grids and random content like text and emoji(yes it’s hideous 😉 … there’s no CSS in it yet!)

UPDATE:

This was awful to style because tables kind of suck, so I stopped trying and came up with something else.
I made another version of it using divs and Flexbox in the end, and it’s actually beautiful!

2 thoughts on “I made my first React Component! ⚛️

Leave a Reply