airbnb / hypernova

A service for server-side rendering your JavaScript views
MIT License
5.82k stars 208 forks source link

Custom attributes on Hypernova DOM container #163

Open juanca opened 4 years ago

juanca commented 4 years ago

Hello.

I am using Hypernova to deprecate simple ERB elements with React components. It's been pretty much a smooth ride except for 1 thing:

Since I am replacing snippets of ERB, I am introducing a new <div> with each render_react_component invocation. I would prefer to be able to style the Hypernova DIV instead of wrapping it in yet another DIV for the sake of layout.

Let me know if there is already a decision on this or whether I can make a PR or something.

juanca commented 2 years ago

Hello. I am encountering this issue again. However, I think being able to add a style attribute would be more convenient for my current case: I want to use a CSS grid layout where each SSRed component is rendered as a named grid item.