Plasmic Action Go To Page not working in Next.js

hey :wave: seems like Plasmic Action Go To Page doesn’t work in Next.js (App Router)

it works really nice with Next.js Pages Router but not App Router

check out this convo as it might help explain why; the TL;DR is: use pages router

thanks :raised_hands: but in my case, it is a client component so my best guess - it’s more related to updated routing mechanism (next/router was replaced with next/navigation)

oh interesting; ya, I’m just learning react/nextjs an that is one of the substitutions that I notice errors on a lot

Hi @flawless_capybara, we just updated @plasmicapp/loader-nextjs so that page navigation should work in the app directory now. Due to some quirks about Next.js 13 with the new next/navigation package, you’ll also need to tell initPlasmicLoader about the new package. Here’s what your plasmic-init file should look like:

import { initPlasmicLoader } from "@plasmicapp/loader-nextjs/react-server-conditional";
import * as NextNavigation from "next/navigation";

export const PLASMIC = initPlasmicLoader({
  nextNavigation: NextNavigation,
  // ...

thanks! :tada: