Warning: unmountComponentAtNode()
andrepcg opened this issue · 1 comments
andrepcg commented
Getting this error with React 16 and react-portal@next
Warning: unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. Instead, have the parent component update its state and rerender in order to remove this component.
This is the code that renders the modal
export default function SearchFilterModal(props) {
const { isOpen, highlightColor } = props;
return (
<div>
{isOpen && <Portal>
<div className="search_filter_modal_header_container">
<FilterHeader highlightColor={highlightColor} />
</div>
<div className="search_filter_modal_content_container">
<FilterContent highlightColor={highlightColor} />
</div>
<div className="search_filter_modal_footer_container">
<FilterFooter highlightColor={highlightColor} />
</div>
</Portal>}
</div>
);
}