question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

11.5.1 or newer TypeScript issue with styled components

See original GitHub issue

Versions

  • react-native-modal: 11.5.1 or newer
  • react-native: 0.61.5
  • react: 16.12.0
  • styled-components: 4.4.1

Description

I see in change log was add TypeScript support. I use styled components and started get next error here:

const StyledModal = styled(Modal)`
  margin: 0;
`;
Снимок экрана 2019-12-01 в 21 40 51

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
luisgurmendezMLabscommented, May 4, 2020

Workaround for now (the styles are applying to the Modal):

const Modal = styled((ModalBase as any))

This error should be fix tho as it might introduce some bugs

2reactions
gabriel11447commented, Oct 1, 2021

still on

"react-native-modal": "^13.0.0",
"react-native": "0.64.2",
Read more comments on GitHub >

github_iconTop Results From Across the Web

11.5.1 or newer TypeScript issue with styled components #381
Description. I see in change log was add TypeScript support. I use styled components and started get next error here: const StyledModal =...
Read more >
Typescript and styled-components gives error on import
Styled Components library does not ship with types. Instead, you'll need to install it from the Definitely Typed repository.
Read more >
Styled Components in React and TypeScript | by Michael Gold
This article will run through an example of using the styled-components feature in React in order to style your React components with css....
Read more >
types/styled-components - npm
Summary. This package contains type definitions for styled-components (https://github.com/styled-components/styled-components).
Read more >
Styled Components & TypeScript - | The Mindless
Styled Components happens to be one of my favorite CSS in JS libraries all time and have been part of almost all of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found