styled-components + native-base causing an error
See original GitHub issueHi! I am having problems using styled-components + native-base. When I try to style a native-base’s button like so:
const StyledButton = styled(Button)`margin:10;`
I get an error: “Faild prop type: Invalid props.style key ‘0’ supplied to View” This happens for any native-base component that I use. Am I doing somethink wrong here?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:14 (5 by maintainers)
Top Results From Across the Web
React Native: `styled-components/native` cannot be resolved ...
In another terminal, yarn react-native run-ios (or use Xcode). You should see the error under the bundler session. More info of react-native ......
Read more >FAQs - NativeBase
Solution 1: Check your rootProject name in react-native-vector-icons's font.gradle, in case if its hard coded there. This causes failure in linking ...
Read more >Releases - styled-components
Due to our rehydration this can lead to errors, where one instance of styled-components will interfere with the other. This is why we...
Read more >uncaught error: cannot create styled-component for ... - You.com
Description. Getting Uncaught Error: Cannot create styled-component for component: undefined after updating to latest native-base package, updated package from ...
Read more >Error Boundaries - React
These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You need to use backticks rather than single quotes:
That’s because
styled-components
uses ES6 tagged template literals. Let me know if that solves the issue!You should give the error message, stacktrace, …
I see two errors :
Seems more like a StackOverflow question than an issue.