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?
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?
And if I try to remove it:
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.
How would that work in terms of my project structure locally?
Would I need to copy paste that same code component into multiple different repos to be able to work with it within plasmic?
You could have a repository for your code components that is deployed somewhere. Then you could use it in multiple projects as the same app host.
Is this “app host” you are referring to this:
I see you guys have this documentation:
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.
Can Plasmic branching handle different app-host configurations per branch?
Or is it a project wide configuration?
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
Not now. Currently app-host is a project wide configuration