callstack / callstack/react-theme-provider
Example of using `withTheme` with Flow
Đang mở
question
- Ngôn ngữ chính
- JavaScript
- Star
- 467
- Fork
- 53
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.