Creating a More Complex Stateless Component

After reading this, you might be thinking, “Okay, I got this.” I thought that, too. Then I decided to create the Notice component I mentioned earlier in the chapter. I soon realized that no, I don’t “got this”—there are a lot of new things we need to make this component happen. Let’s dive in:

First, here’s what we want the notices to look like when they grow up. The notice box will need styling to get the border and the vertically aligned text:

images/react_images/notice_example.png

We’ll put the icons, which are in SVG format, into a directory named notice_icons at the top level of our project directory:

 ├── bsconfig.json
 ├── lib ...

Get Web Development with ReasonML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.