Plasmic host using a react router v7 (or remix) project

Video: Plasmic host using a react router v7 (or remix) project

trying to use plasmic-host
but in plasmic studio I’m getting 404

is it possible to use code-components in a react router v7 framework app? (which works like Remix)

And if it is not possible yet, that would mean I need to use Codegen instead of plasmic-loader.
And I don’t know how to do that with this type of project.
I guess I won’t be using the loader() functions but getting the components from the respective folder and returning them instead of


but what else what are the drawbacks? ssr will still work fine right?

Hello @johannes_horteis, you should be able to register code components in a react router v7 project. Did you modify your vite.config.ts file as explained here: Get started with Remix | Learn Plasmic? Also, ensure that you have imported your plasmic-init file in plasmic-host

yes I did that

how could I fix that 404 issue for plasmic-host?

Can you access http://localhost:5173/plasmic-host directly from the browser? You should be able to see:

good news, it works now. I can use plasmic studio while the host is active without 404
I don’t know what changed.

1 Like

and you were right, in needed to add that

import * as React from 'react';
import { PlasmicCanvasHost } from '@plasmicapp/loader-react';
import '../plasmic-init'; 

export default function PlasmicHost() {
  return <PlasmicCanvasHost />;
}
1 Like