A small bit of open source: withModals.js
Higher ordered React components are great for reducing boilerplate and generalizing patterns. We’ve written a few here at Greenhouse, and I think you might find them as useful jumping off points to write your own.