Example of using `withTheme` with Flow
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react
调研方向
从 issue 中的 withTheme 和 PureComponent 示例入手,调查包装组件的 Flow props 应如何声明。记录一个符合惯例的 Flow 示例,避免在 JSX 调用处要求提供 theme;issue 中未指定文件或测试。
由索引模型根据 Issue 内容生成。
描述
I create a component with Props type that includes a theme:
type Props = {
theme: MyTheme,
otherProps: any,
};
class MyCmp extends PureComponent<Props> { ... }
Then I export it like this:
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?
- 主要语言
- JavaScript
- 星标
- 466
- 派生
- 53
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/react-theme-provider 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
-
question
难度 5/5 一周以上 新手友好度 10/100
callstack/react-theme-provider#156 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
callstack/react-theme-provider#144 · 3 条评论 · 4 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 25/100
callstack/react-theme-provider#139 · 1 条评论 · 12 个 reaction ·
查看 callstack/react-theme-provider 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
type/bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
check:failed logos:edit
难度 2/5 1-3 小时 新手友好度 72/100
iptv-org/database#36354 · 1 条评论 ·
维护者通常 4 天内回复
-
status:untriaged
难度 2/5 1-3 小时 新手友好度 78/100
midnightntwrk/midnight-wallet#791 ·
维护者通常 1 天内回复