...

/

Adding Modal Dialog Support

Adding Modal Dialog Support

We'll cover the following...

As you may have noticed, this course isn’t really meant to result in a fully-working meaningful application. It’s primarily intended to give me reasons to show off specific useful React and Redux techniques. That means that there’s a number of things that are going to be obvious over-engineering. Like, say, modal dialogs. This app doesn’t need modal dialogs, but guess what: we’re going to add modal dialogs to Project Mini-Mek anyway :)

The basic concepts of handling modals in React and driving them from Redux have been described many times elsewhere, in excellent detail. My links list has many articles on the topic, but here’s a selected reading list:

  • Dave Ceddia’s post on Modal Dialogs in React demonstrates the basic approach for rendering and control a modal.
  • Dan Abramov’s Stack Overflow answer on how to control modal dialogs using Redux shows how to write reducers that contain descriptions of a modal, and a central React component to render it.
  • David Gilbertson’s post Modals in React, which discusses the tradeoffs of different approaches for putting modals on top of the rest of the app
  • Mike Vercoelen’s article Scalable Modals with React and Redux, which shows Dan’s technique for Redux-driven modals in practice
  • And finally, my own prior blog post on handli
...