callstack / callstack/react-theme-provider
Example of using `withTheme` with Flow
Aperta
question
- Lingua principale
- JavaScript
- Stelle
- 467
- Fork
- 53
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I create a component with `Props` type that includes a theme:
```js
type Props = {
theme: MyTheme,
otherProps: any,
};
class MyCmp extends PureComponent { ... }
```
Then I export it like this:
```js
export withTheme(MyCmp);
```
Then when I import it and use in JSX I'm getting a Flow error that `theme` prop is required.
What is the idiomatic example of defining `withTheme` component with Flow?
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.