Since: 1.41.0, @fullstory/react-native: 1.3.0
End Page
Call fsPage.end()
to mark the end of the view of the page. This will make the
current page not defined, if the page is the current page. If the page is not
the current page, this will have no effect.
Calling this method is only needed if you intend to leave portions of your app without defined pages. Otherwise, it is recommended to not call this method. For example, you may only wish to define pages for a checkout flow within your app. You would want to call end so when the user leaves the flow other portions of the app without defined pages won't be treated as part of the checkout page.
fsPage.end()
is analogous to the unmount
lifecycle event in a component and should
should typically be called in componentWillUnmount
or returned as a cleanup function in useEffect
.
Additional Information
end(): void;
Example Invocation
const HomeScreen = () => {
const pageRef = useRef(null);
useEffect(() => {
pageRef.current = new FSPage("Home");
pageRef.current.start();
return () => pageRef.current.end();
}, []);
⋮
}