react: typescript integrate withRouter
Posted nyan-workflow-fc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了react: typescript integrate withRouter相关的知识,希望对你有一定的参考价值。
define interface:
export interface INav nav: string export interface IModuleItem state?: string; type?: string; uri?: string;
use in Function Component:
import INav from "./path/to/menu.ts"; const AppNavigator = (props: INav & RouteComponentProps) => const [currentNav, setCurrentNav] = useState<INav>(props.nav); .... export default withRouter(AppNavigator);
以上是关于react: typescript integrate withRouter的主要内容,如果未能解决你的问题,请参考以下文章
如何解决这个错误。 com.google.android.gms.tasks.task executors$zza 无法转换为 android.app.activity。我是 Java 和 Andro
java.lang.RuntimeException: Unable to start activity ComponentInfo{XXX}: Error inflating class andro
Java.lang.IllegalStateException:应用程序PagerAdapter更改了适配器的内容而不调用PagerAdapter#notifyDataSetChanged andro
转How to Start Intel Hardware-assisted Virtualization (hypervisor) on Linux to Speed-up Intel Andro