Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: enforce scrolling to top in AppLayout component
import React from 'react';
import './AppLayout.scss';
import HeaderNav from '../../containers/HeaderNav/HeaderNav';
import ScrollToTop from '../ScrollToTop/ScrollToTop';
export function AppLayout(props) {
return (
<ScrollToTop>
<div className='app-layout'>
<HeaderNav/>
{props.children}
</div>
</ScrollToTop>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.