Replies: 1 comment 1 reply
-
Just an educated guess here, but I'd imagine it's a deliberate choice. It's probably where some of the performance benefit of ViewComponent comes from relative to plain Action View. @BlakeWilliams has something in the works that might change this if it's merged, however. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So looking at https://github.com/github/view_component/blob/main/lib/view_component/base.rb#L145-L147 which says that
render
will only reuse theview_context
when not rendering a component.I have a component that renders a child component within a
call
and I need it to use the same view context. So was wandering why the above is the way it is, and why rendering a child component does not also reuse the view context?thx
Beta Was this translation helpful? Give feedback.
All reactions