Created a Modal in React Using Portals

Hi Hasnoders,

For the couple of days, I have been planning to learn advanced topics in react. But have not had time to learn much. In order to grasp the concepts better, i need to apply those concepts as examples before I take the next topic. So therefore, every weekend I pick up advanced topics that i need to master that week and become familiar with it by applying it to small projects. Anyways out of HOC, Context API and React Hooks and many others, I randomly picked React Portals.

So Firstly, I went though getting the concept of portals clear as I went through a couple of tutorials in Youtube. LevelUpTuts really good channel to learn react concepts.

Then, I created a very basic modal. I implemented a modal to minimize and expand like gmail. So here is the link to the CodeSandBox.

Edit delicate-shape-qqsd5

If you have any suggestions on how I can improve the code please let me know, I am always happy to learn new ways to code.