Styled-components-website: styled-components examples for React Native in expo snack are not working

Created on 14 Mar 2019  路  6Comments  路  Source: styled-components/styled-components-website

Broken Demos:

https://snack.expo.io/Sk8O7_9og

https://snack.expo.io/@danielmschmidt/styled-components

when attempting to 'run' the code either in the emulator or on my device, an error message is given:

Device: (78:20) undefined is not an object (evaluating '_native2.default.View')
Evaluating module://App.js
Loading module://App.js

snack error

Steps to recreate:

Click the links and try running the demos

All 6 comments

Seeing this error as well.

For now import styled from 'styled-components' without the /native seems to work. I'll try to fix the issue with /native.

Thanks @satya164 import styled from 'styled-components' worked.

https://snack.expo.io/@chris35469/c3R5bG

For now import styled from 'style-components' without the /native seems to work. I'll try to fix the issue with /native.

@satya164 rather 'styled-components' as soon as you don't want copy&pasting folks to guess what's the An unexpected error occurred: "https://registry.yarnpkg.com/style-components: Not found" is all about while yarning the package.

Having similar issue trying to load styled.img, but import styled from 'style-components' doesn't work for me...

@free4mOriginal I hope then you red my previous comment more carefully. There was a typo. And there was a fix.

Was this page helpful?
0 / 5 - 0 ratings