How to refresh other component

Hello guys,

I’m working on building Twitter clone following laracast series but I stuck.

I have two components on my landing page. The first one is a simple form and the second one is a listing. Now the problem is that when I submit the form and add new record to db, I cannot figure out how to refresh the second component (listing) data … I got it working by combining both components in one but this is not ok, since I want to use the listing in other pages.

I feel like I’m doing something wrong here and would be great if you can help :slight_smile:

Here is an image so you can get an idea:

Cheers!

Hey, @VelislavIchev
Any Code example it will be great.

Hi @VelislavIchev
Add a listener to the “other” component to a specific event and then trigger this event in your main component:

Ahhh yes! On the right way but still wasn`t able to make it work… Anyways after reread the documentation, it worked!

Thanks @Dimonka2!