Can't use plugins when a certain component has two instances with the same name
Hey all,
First of all, this is a truly an awesome project!
In my project I want to render the same component twice with different props, it works really well :)
However, If I write a plugin that uses a hook that receives the components hash (such as prepare_request)
the hooks gets a hash which has only the last component. I think that the problem is https://github.com/airbnb/hypernova-ruby/blob/e6c6553a4838203f4cdd62368ba1c146f632233d/lib/hypernova/controller_helpers.rb#L82 since it overrides the key.
Just for clarification the batch is sent just fine since it creates the hash differently. https://github.com/airbnb/hypernova-ruby/blob/e6c6553a4838203f4cdd62368ba1c146f632233d/lib/hypernova/batch.rb#L45
What should I do?
Thanks, Jonathan
Same issue here. This hash conversion is bogus. Also it takes place only to feed the hash to the plugins, the data sent to hypenova is correct as you pointout.
At the moment, each top-level component needs to be unique on the page.