4 ms·
Append the modal component to the react app element, and then change the app state to open it. The disadvantage is that your modal exists outside of the compon
by holdenc 9y ago
Append the modal component to the react app element, and then change the app state to open it. The disadvantage is that your modal exists outside of the component that opens it, so you can't pass in props from parent to child. But as long as the triggering component and the modal have access to the same app state store it's not a problem, and fairly clean.