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
RE: Inter portlet communication with react js
Pothapu Jagadeswara Reddy, modified 6 Years ago.
New Member
Posts: 4
Join Date: 7/23/19
Recent Posts
Hi All,
I am using Liferay 7.2 version. I have a requirement like develop portlets with react js and those portlets internally need to communicate. Request you to help me please!!!For example, I created portlets with react js. Those portlets are like HTML form, text input, button etc. Now these portlets should have inter portlet communication based on events.
Appreciate your help!!!
I am using Liferay 7.2 version. I have a requirement like develop portlets with react js and those portlets internally need to communicate. Request you to help me please!!!For example, I created portlets with react js. Those portlets are like HTML form, text input, button etc. Now these portlets should have inter portlet communication based on events.
Appreciate your help!!!
I guess there are infinite ways to achieve that, but you can see an example where inter portlet communication is done using Redux here -> https://github.com/izaera/liferay-js-toolkit-showcase/tree/react
I'm not saying that's the best way, but just a possible one out of the many.
Hope that helps.
I'm not saying that's the best way, but just a possible one out of the many.
Hope that helps.
I did a blog post for Angular 2 here: https://liferay.dev/blogs/-/blogs/angular-2-portlets-in-dxp
Although you're using React, the same Liferay.on() and Liferay.fire() methods are still available to you.
And the plus side is that the mechanism is not tied to a specific portlet implementation, as long as you can access the Liferay JS objects, you can use this to communicate.
Although you're using React, the same Liferay.on() and Liferay.fire() methods are still available to you.
And the plus side is that the mechanism is not tied to a specific portlet implementation, as long as you can access the Liferay JS objects, you can use this to communicate.