docz
docz copied to clipboard
Styles don't work with styled-components + react-native
Question
Description
Hi! First congratz for this awesome project 😁
We have a monorepo using react-native + styled-components (with xstyled) and it was perfectly working in the last major of Docz (1.x).
But after update to Docz 2.x we have been with problems run it, basically just inline styles of react-native works and all styling that using styled-components have been ignored inside Playground
.
Environment
- docz version: `2.3.1
- OS:
OSX 10.15.7
- Node/npm version:
v14.13.1
/6.14.11
Additional context/Screenshots
We (@brunobertolini, @diegotsi) have tried a lot of things to fix it but we have not been able to advance in the resolutions 😅
Someone can help us with this question?
Hi! We finally figured out the main problem with docz and our react native app. And it's very simple.
We are using xstyled, and this lib export styled
from styled-components web, so we test two scenarios
1 . Styled our components using import styled from 'styled-components'
and it does not work.
2. Styled our components using import styled from 'styled-components/native'
and it's work like a charm ❤️
So for everyone, that's stuck with this problem just check if you are using styled from the native package inside styled-components.