You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a React useEffect hook that calls init() on mount. There is currently no cleanup function to un-initialize FullStory.
When this React component mounts, it initialized FullStory (expected behavior).
If this component unmounts, then remounts, it emits a console warning that FullStory has already been initialized and not to initialize it again.
This is fair. In the live app, this component doesn't unmount. However, in unit tests, the application mounts and unmounts multiple times when testing behavior. As a result, this component mounts, initializes FullStory ✅, runs a test, unmounts, then mounts, initializes FullStory ⚠ (warning), runs a test, unmounts.
I checked into adding shutdown as a cleanup step, but it does not appear as if shutdown resets the _fs_initalized variable.
Any advice?
Is "unset _fs_initialized in shutdown" a valid feature request here?
The text was updated successfully, but these errors were encountered:
I have a React
useEffect
hook that callsinit()
on mount. There is currently no cleanup function to un-initialize FullStory.When this React component mounts, it initialized FullStory (expected behavior).
If this component unmounts, then remounts, it emits a console warning that FullStory has already been initialized and not to initialize it again.
This is fair. In the live app, this component doesn't unmount. However, in unit tests, the application mounts and unmounts multiple times when testing behavior. As a result, this component mounts, initializes FullStory ✅, runs a test, unmounts, then mounts, initializes FullStory ⚠ (warning), runs a test, unmounts.
I checked into adding
shutdown
as a cleanup step, but it does not appear as ifshutdown
resets the_fs_initalized
variable.Any advice?
Is "unset
_fs_initialized
inshutdown
" a valid feature request here?The text was updated successfully, but these errors were encountered: