WooCommerce Admin should register its own click handlers or components for use in the wc nav project. Currently, clicking these links navigates to the page using a standard link without using the react router in WCA.
There's a filter for the menu items that can be used to modify the data: woocommerce_navigation_menu_items. It's probably easiest to pass the component used for linking directly to the menu items using the LinkComponent prop.
{
id: 'menu-item',
title: 'My menu item',
LinkComponet: NavLink,
}
Note: wait on decision for compositional structure in https://github.com/WordPress/gutenberg/pull/25057 before tackling this issue.
WooCommerce Admin should register its own click handlers or components for use in the wc nav project. Currently, clicking these links navigates to the page using a standard link without using the react router in WCA.
There's a filter for the menu items that can be used to modify the data:
woocommerce_navigation_menu_items
. It's probably easiest to pass the component used for linking directly to the menu items using theLinkComponent
prop.