INNER CODE UNIT · JavaScript
UserProfile
misa-j/social-network · client/src/App.js:18
const UserProfile = lazy(() => import("./UserProfile/UserProfile"));
const PostUploadPage = lazy(() => import("./PostUploadPage/PostUploadPage"));
const PostPage = lazy(() => import("./PostPage/PostPage"));
const HashtagPage = lazy(() => import("./HashtagPage/HashtagPage"));
const LocationPage = lazy(() => import("./LocationPage/LocationPage"));
const MessengerPage = lazy(() => import("./MessengerPage/MessengerPage"));
const Navbar = lazy(() => import("./components/Navbar"));
class App extends React.Component {
componentDidMount() {
const { dispatch } = this.props;
window.addEventListener("scroll", this.handleNotificationPopupClose);
history.listen((location, action) => {
// clear alert on location change
dispatch(alertActions.clear());
});
}