styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.28k stars 105 forks source link

Prop `className` did not match when using createX #261

Closed ProxN closed 3 years ago

ProxN commented 3 years ago

🐛 Bug Report

Prop className did not match. Server, When using I'm using createX

import styled, {
  createX,
  compose,
  space,
  backgroundColor,
} from '@xstyled/styled-components';

const x = createX(compose(space, backgroundColor));

const CustomBox = styled(x.div)`
  background: red;
  color: #fff;
`;

const Box = (props) => {
  return <CustomBox {...props} />;
};

export default Box;

To Reproduce

once you start editing code error will show in the console

https://github.com/ProxN/xstyled-custom-x

gregberge commented 3 years ago

Will be solved in v3

gregberge commented 3 years ago

Please reopen it if you have problem in v3.