我有一系列菜单链接,我可以将它们传递给多个组件以供使用:
const menuLinks: { text: string; Icon: any; press: any }[] = [
{
text: "Contact",
Icon: IconContact,
press: () => console.log("contact pressed"),
},
{
text: "About",
Icon: IconAbout,
press: () => console.log("about pressed") },
];
如何使press
属性调度Redux操作?