Om Next Multiple Instances of the Same Component with Different Query Parameters

77 views Asked by At

I'm developing a tree menu using Om Next by nesting multiple instances of the same component ((defui Tree...). I can recursively build the tree by passing different properties, so the initial rendering is fine.

But, re-rendering items upon the state change is problematic since they share the same query and the params. But, if I can have different query parameters in different component instances they will be served with appropriate properties.

My understanding is, the query and the parameters are linked to the Component rather the individual instances. Therefore, trying to update parameters using om-next/set-query! didn't work here.

What is the idiomatic way of handling such a scenario? Can we do a workaround with om/factory?

(Please pardon me if I'm suffering from a misunderstanding of fundamentals here.)

0

There are 0 answers