im trying to render something like whatsapp, in the main screen you got all the groups rendered, and when you click on a group then a new route become active and the main screen disabled, i want that when the user click on the group (its a object of course) then the route that will respond to that event will somehow get the group object of the component that contain the to the group.
ill show you a description of the code:
<Route exact path="/" render={props => (
<GroupScreen groups={this.state.groups} />
)} />
<Route exact path="/conversation_area" render={props => (
<h1>bla bla</h1>
)} />
in the groupsScreen component each single group component get a group object that related to her, inside the group representation in the main screen you can click on it and it will route you to /conversation_area, now i know i can pass the name of the group in the url for example and than iterate over this.state.groups and this will work, but i wonder if there is a better way to communicate between link and a route...
the group component is simple, just a component that get a group object in his props, and a that wrap all the design of the group.
thanks alot!