Reactivity and CreateContainer

Hello,

Does any one have an example of a master / detail view which changes reactively according to which field in the master view was clicked.

Example
Masterview: list of authors, Detailview: list of books…
Click on an author will let you see all books of the author in the detail view.

The official meteor react app does this but binds the createContainer params to react router…I’m not sure how to do it reactively without a router.

I assume the layout would be DataContainer (createContainer for data) --> ComponentsContainer (i.e. page which renders master component and detail component)

So how would I get the ComponentsContainer to reactively interact with the DataContainer

Thanks for any advice!

ReactRouter just puts the params in the props of the container. Any props on your container component can be accessed in the argument to the createContainer function.

If you want a child to pass data back up to the parent, you can do that by setting a route, using a callback from the parent, or using a ReactiveVar passed to the child.

Do you know of a code example? That would really be extremely helpful in this case.

Thanks for the advice though!

anyone have a code example? just need to see the important points

For anyone looking at this thread in the future, after looking through meteor forums and SO I found this as a good source to how to use reactiveVar to achieve my result

And this as to how to do it with props