Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Toggling between 2 react portlets : refresh issue
Hello, I have created 2 react portlets and adapted them to Liferay (7.2 ga1) with "yo liferay-js:adapt". Then I have added them in their respective pages. The 2 portlets shows ok. The first portlet is displayed, then when I click on the menu to go the second, the 2nd portlet is displayed correctly. The issue is when I click on the menu to get back to the first portlet, the first portlet is displayed just blank.However when I refresh the url, the portlet does show correctly.And nothing special in the log neither Liferay log, nor in the chrome log.Any idea please?
After further investigation, it seems it is related to "yo liferay-js:adapt" vs "yo liferay-js". When I created directly a simple portlet with "yo liferay-js" then built and deployed the portlet into LR. Whenever I come back to this portlet, it shows correctly without the need to refresh.However, if I create a standard react app with "npx create-react-app my-app", then convert it to LR using "yo liferay-js:adapt", the generated portlet has the same refresh issue.Any idea?
Hey Yahia:
I'm already investigating this and it looks like an issue with adaptation, so I have created this issue to have a look at it -> https://github.com/liferay/liferay-js-toolkit/issues/498
Thx for reporting it :-).
I'm already investigating this and it looks like an issue with adaptation, so I have created this issue to have a look at it -> https://github.com/liferay/liferay-js-toolkit/issues/498
Thx for reporting it :-).
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™