|
|
|
|
|
by orb_yt
3184 days ago
|
|
Lovely. The file size reductions are quite surprising. Removing the need to wrap sibling elements in a single parent element is a welcome change. I'd be interested in hearing some use cases for using the Portal API. Lastly, the new licensing announced last week was fantastic news. I commented on last weeks thread, but I want to extend another round of compliments to Facebook and the React community as a whole for prompting this change. Props to them. |
|
Portals are helpful when using content overflow in modals. For example, we have a modal which contains a form and that form has an autocomplete text box. When we render the autocomplete part, we need to render it outside of the modal, otherwise the overflow policy blocks the contents and does not allow the autocomplete are to appear over / outside of the modal.
The use of portals also make it easier to support screen readers through the aria tags by allowing the application to quickly block the background of the application and allow the screen reader to focus on the content presented to the user.