


AEM React Spa components are rendering twice in publish Mode.
In Author Mode:
In Publish Mode:
Why the content is rendering twice and How to fix this issue?
Views
Replies
Sign in to like this content
Total Likes
Hi @Leela-Pavan-Kumar ,
This possibly happens if you are using the React.StrictMode in your markup.
An ugly fix would be to snub the extra calls from en.model.json
Reference:
https://andreasheissenberger.medium.com/react-components-render-twice-any-way-to-fix-this-91cf239616...
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/spa-editor/spa-editor-hellowo...
Hi @milind_bachani ,
Thanks for the response,
We are not using React.StrictMode in our index.js.
Could you please let me know how can I snub the calls from en.model.json.
Hi @Leela-Pavan-Kumar - are you still facing the issue ?
If yes, you need to check couple of things before making changes to the model.json:
1. The publisher CRX-de does not show 2 component in your /content path
2. Please post the en.model.json response from network tab here.?
3. Try to align the component with tutorial link shared above.
We can investigate further based on the above mentioned checks.
Thanks.