import React, { memo } from 'react'
import { Outlet, useNavigate } from 'react-router-dom'

const Home = memo(() => {
  const na = useNavigate()
  const to = () => {
    na('/home/product', {
      state: {
        username: '123'
      }
    })
  }
  return (
    <div>
      <button onClick={to}>Product</button>
      <Outlet />
    </div>
  )
})

export default Home
