callstack / callstack/react-theme-provider

Example of using `withTheme` with Flow

オープン
#53 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
JavaScript
スター
467
フォーク
53
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。