Replies: 1 comment 9 replies
-
Hi! Thanks for the suggestion. This new |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Inspired by Rails 7.1 beta normalization API I think View Components can benefit from similar hooks that triggers on
before_render
e.g.
becomes
This will allow an elegant way to normalize data that needs access to the view context such as i18n translations.
It will also make it easier for people stuck on view component V2.6 and less which allowed using the view context in the instantiation of the components to migrate their code to newer versions without introducing so much boilerplate to move the code for instantiation to before render.
e.g.
i.g.
becomes
I'm willing to code the feature if you all are open to it.
Beta Was this translation helpful? Give feedback.
All reactions