We have made react components in an AEM React spa project. Is there any way that we can use the same components in other projects/sites like we do for normal HTL components?
We tried using an experience fragment but that too didn't work.
Any suggestions on how we can achieve this ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
To reuse React components in other AEM projects/sites, you can create a shared npm package containing the React components. This package can be installed as a dependency in the AEM projects, allowing you to import and use the components in your AEM scripts or templates. This approach promotes code reusability and simplifies maintenance across multiple projects.
Hi,
To reuse React components in other AEM projects/sites, you can create a shared npm package containing the React components. This package can be installed as a dependency in the AEM projects, allowing you to import and use the components in your AEM scripts or templates. This approach promotes code reusability and simplifies maintenance across multiple projects.
Hi,
But how can we convert it as a npm package. does it differs from usual process f how we convert a create-react-app into an npm package? if so, please share the steps.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies