Another benefit of using FOSS boilerplate stuff like this is seeing superior patterns to patterns you're using.
The have a great modal hook pattern that I'm probably going to start using.