Styled-jsx: Data-jsx missing on the custom parent element

Created on 7 Jun 2017  Â·  4Comments  Â·  Source: vercel/styled-jsx

Hi,

First of all, sorry for the last issue, I didn't have time to contribute (https://github.com/zeit/styled-jsx/issues/215). However, I found another interesting bug I think, I made a little exemple of the behavior here:

https://github.com/loick/issue-styledjsx

Use case:

  • When I create a style tag with the jsx attribute, the parent tag also receives the data attribute
  • When I create a style tag with the jsx attribute and when the parent is a custom tag created (React.createElement), the parent doesn't receive the data attribute.

Is there something specific to add for this kind of situations ? I checked on the other Issues raised, but I'm not sure it was the same problem so.. :)

Thanks !

All 4 comments

looks like this https://github.com/zeit/styled-jsx/issues/147 if so it is on my radar – you can either give it a stab and try to fix it or wait until I have some free time to work on it :)

sorry in my previous comment I was talking about CustomTag. Regarding React.createElement unfortunately we don't suppor that :(

Okay thanks, I'll try to take a look at it. Do you already know if this is related to something specific? Like should we render all of the components before executing the <style jsx> parsing ?

@loick sorry for the late reply, styled-jsx trasforms JSX only that's why it doesn't work with React.createElement.

Was this page helpful?
0 / 5 - 0 ratings