So i have the following components structure :
1
/ \
2 4
| |
3 5
Component 3 is a marker displayed on a map. Component 5 is a list representing the markers on the map.
Will it be possible that once an onClick event happens on component 5 it will trigger some function/state in component 3 to open an infowindow?
Yes, If you are using just React, then you can pass the click handle function from Root component (1) to component 5 and toggle the state for info window in there and pass the info window state all the way from Root component (1) to component (3).
Another way would be using Redux. Where you can dispatch a onclick action from component 5 to change the Redux store value and make the component 3 to connect to the redux store