Query Params and DDAU

I’m currently building out a route controller that has a query param that is used to determine the display state of a child component. Basically whether to display the data as a table or graph.

As it is currently built, the controller passes the property to the component, and the component can modify the property through a select element. In this configuration, the value is 2 way bound, which is something I would like to avoid.

What would be the most correct method for passing the query param to the component as read only data so that I can manipulate it via action?

Some blog posts have lead me to the readonly helper, but I’m weary to use it as I haven’t found any documentation on it.

You’re right, it’s not in the API docs but does exist. IMO, I would still use it. There has been work done for support in Glimmer 2, so you know it’ll stick around.

Hmmm… thanks. I think I’ll go this direction. I’d love to hear other viewpoints if there are any, though. Thanks!

At this point, I think it’s the best approach. I believe Ember is going to be one-way by default in the future, but I don’t know the timeline on that. (Basically {{readonly}} by default, not needing the helper, but then re-enable two-way by using the {{mut}} helper.)

so glimmer2 is coming up soon?

The latest I’ve heard is 2.9 or 2.10, so 6 to 12 weeks for the first beta with Glimmer 2. Canary will have it sooner of course.

very cool , looking forward 2.10 and then next cool feature is Routable Compnents ??