I broke these up into separate commits, so please feel free to cherry-pick if you aren't satisfied with all.
I just upgraded to React 16 and your latest release and unfortunately still had some issues.
First, 8917a44 fixes an error I was getting when importing. It was unable to resolve build/main, as it does not exist.
499eb4c addresses a bug I ran into that should be reproducible with the following steps:
Load a page with a popover
Open the popover
Close the popover (so exit() is called)
Navigate elsewhere or do something that will cause componentWillUnmount to get called
The issue was that componentWillUnmount and exit both call untrackPopover, but if exit has already been called, an error will be thrown when trying to unbind events.
434bd80 is addressing an SSR issue I have been having. ReactDOM.createPortalrequires the second argument to be a DOM element. When isServer evaluates to true, it is being set to null and thus throwing an error when the server attempts to render. The code change will either return false or continue with the createPortal call, allowing the server to render.
I broke these up into separate commits, so please feel free to cherry-pick if you aren't satisfied with all.
I just upgraded to React 16 and your latest release and unfortunately still had some issues.
First, 8917a44 fixes an error I was getting when importing. It was unable to resolve
build/main
, as it does not exist.499eb4c addresses a bug I ran into that should be reproducible with the following steps:
exit()
is called)componentWillUnmount
to get calledThe issue was that
componentWillUnmount
andexit
both calluntrackPopover
, but ifexit
has already been called, an error will be thrown when trying to unbind events.434bd80 is addressing an SSR issue I have been having.
ReactDOM.createPortal
requires the second argument to be a DOM element. WhenisServer
evaluates to true, it is being set tonull
and thus throwing an error when the server attempts to render. The code change will either returnfalse
or continue with thecreatePortal
call, allowing the server to render.