4
0
forked from crowetic/commerce

Avoid unnecesary rerenders

This commit is contained in:
Belen Curcio 2020-11-06 17:14:01 -03:00
parent 2ad7c59c43
commit 817fee61cf

View File

@ -5,12 +5,8 @@ import { Logo, Container } from '@components/ui'
import { Searchbar, UserNav } from '@components/common'
import cn from 'classnames'
import throttle from 'lodash.throttle'
interface Props {
className?: string
}
const Navbar: FC<Props> = ({ className }) => {
const rootClassName = className
const Navbar: FC = () => {
const [hasScrolled, setHasScrolled] = useState(false)
const handleScroll = () => {