vega / react-vega

Convert Vega spec into React class conveniently
http://vega.github.io/react-vega/
Other
381 stars 67 forks source link

Re-rendering with className causes react-embed to lose styling #535

Open agirton opened 2 years ago

agirton commented 2 years ago

Hello!

Noticed that due to the way react-embed applies the className to the parent dom node, if a component re-renders and it uses the className prop on ReactVega it causes the react-embed className to be dropped. You can see an example here in codesandbox if you add className="hi" the embed styling gets dropped. A work around for us is we can add a wrapper div and not apply a className to this component.