When registering an external component for use within plasmic, can you go ahead and import that component in a separate project where the original project had been imported?
Example:
I did a Plasmic.registerComponent on a component “testComponent” in a Plasmic project called “Library”
I then import the “Library” Plasmic project into a project called “Main”
I should be able to use “testComponent” in “Main” correct?
Hey Cody! Code components are local to the project since they’re only available through the app host. If you want to use the same code component in both the Library and Main projects, you will need to configure both projects to be app hosts.
It is useful to point your Plasmic project to your localhost dev server for now, while you are setting it up. However, that means using the Plasmic project will require your local dev server to be running, which is not only inconvenient for you, but also makes it impossible for your teammates to open and edit the project.
Therefore, once you are done setting it up, we recommend that you deploy your app host page to your production app, and update the host url for your project to <https://my-app.com/plasmic-host> instead. That way, it is possible for any member of your team to open and edit the project in Plasmic without running a local dev server.
I think I see what to do now… will come back here if I get stuck more.
No! By app host, I mean hosting plasmic app in your app. This way we can use your own react component in Plasmic studio by registering them https://docs.plasmic.app/learn/app-hosting/