网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  useHistory做页面跳转导航

useHistory做页面跳转导航

分类: IT文章 • 2024-09-12 14:35:19

useHistory

The useHistory hook gives you access to the history instance that you may use to navigate.



import { useHistory } from "react-router-dom";

function HomeButton() {
  let history = useHistory();

  function handleClick() {
    history.push("/home");
  }

  return (
    <button type="button" onClick={handleClick}>
      Go home
    </button>
  );
}

相关推荐

  • html导航栏怎么实现不跳转页面就能换内容
  • 网站改版页面怎么做301重定向跳转
  • iOS 页面跳转后更动左边导航栏的文字还有箭头颜色
  • jquery导航栏html页面跳转导航字体变色
  • useHistory做页面跳转导航
  • 捧腹网的导航是如何做的呢?能随着页面的滚动而保持在最上面
  • 小弟我是做javaWEB开发的,请教一下页面的跳转有关问题
  • 点进页面 导航区域有背景色 这个如何做
  • 页面间跳转方式总结 1.Storyboard的segues方式 2.选项卡UITabBarController控制器 3.导航控制器UINavigationController 4.利用Modal形式展示控制器 5.直接更改 UIWindow的rootViewController
  • 导航随着页面移动而移动是如何做的
  • leetcode349 350 Intersection of Two Arrays & II
  • leetcode83 Remove Duplicates from Sorted List
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号