The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
frontity.settings.js file has the menu defined, but I cannot add there the normal link, because it won’t work. The API source will be added in front of the url. Is there a way to do what I want?
I think it’s better to modify the Link component and this way you will keep classes, styles, etc.
const onClick = event => {
// Do nothing if it's an external link
if (link.startsWith("http")) return;
event.preventDefault();
// Set the router to the new url.
actions.router.set(link);
window.scrollTo(0, 0);
};