Typescript section and React Native
See original GitHub issueRelated to https://www.styled-components.com/docs/api#typescript
The next code snipper wouldn’t work for react-native
// styled-components.ts
// notice that I actually import styledComponents from native (not the web one)
import * as styledComponents from 'styled-components/native';
import { ThemedStyledComponentsModule } from 'styled-components';
import ThemeInterface from './theme';
const {
default: styled,
css,
injectGlobal,
keyframes, // this does not exists on native
ThemeProvider
} = styledComponents as ThemedStyledComponentsModule<ThemeInterface>;
export { css, injectGlobal, keyframes, ThemeProvider };
export default styled;
because I actually use styled-components/native
I can’t use the code snippet.
Looking into the code this will require to fix the typespec for ThemedStyledComponentsModule
of the native version
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using TypeScript - React Native
TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. While React Native is built in Flow, ...
Read more >How to Run React Native Apps with Typescript - Section.io
This tutorial will guide the reader on how to set up and run React Native apps with TypeScript.
Read more >Using TypeScript with React Native - LogRocket Blog
An introduction to using TypeScript in React Native apps, including a tutorial and example build for a mobile app.
Read more >React-Native with Typescript. Part 1 - Medium
Adding Typescript to a react-native project - Template options. Both Expo and React-Native CLI provide templates to have your app project ...
Read more >Should we use TypeScript with React Native ? - GeeksforGeeks
Should we use TypeScript with React Native ? · TypeScript is basically JavaScript under the hood. Typescript adopts the basic building blocks of ......
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
@swissmanu Any update on where things stand with TypeScript support and react-native?
Make a request on definitelytyped! On Thu, Jan 10, 2019 at 12:53 PM Bernardo Sunderhus < notifications@github.com> wrote: