Building a simple and reusable modal with React hooks and portals

A lot of interesting new things have been added to React in the last two years. For me personally, hooks have probably been the most exciting addition in recent years. Before hooks I pretty much always used recompose, a simple helper library consisting of some higher-order components to wrap functio…