JSX Tokenizer: add tokens which can be parsed using `children`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- frontend
调研方向
首先定位 createToken 的实现,并跟踪 fallbackFn 如何影响返回的 JSX 值,以及 children helper 如何解析该值。比较提议的实现方式,然后验证不带 fallbackFn 的 token 可以传递给基于 children 的消费者,同时保留现有的友好警告行为定义。
由索引模型根据 Issue 内容生成。
描述
Describe The Problem To Be Solved
Currently, the component returned by createToken will return a function element. This way we can display a friendly warning in the console if something tries to render the token, instead of an error from trying to insert a non-JSX.Element type.
The downside of that approach is that the token elements cannot be passed to a context provider, transition-group, or anything that tries to resolve the children using the children helper, even if it doesn't necessarily render anything yet.
So we lose a bit of functionality, and composition value, for a nicer misuse warning.
Suggest A Solution
I see this being implemented in two ways.
Either the createToken component will be returning an object, instead of a function if the fallbackFn param is not provided.
Or there could be createToken and createRenderableToken as separate functions.
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 165
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs-community/solid-primitives 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
solidjs-community/solid-primitives#1059 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
solidjs-community/solid-primitives#1055 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
solidjs-community/solid-primitives#894 ·
维护者通常 1 天内回复
-
help wanted
难度 2/5 1-3 小时 新手友好度 52/100
solidjs-community/solid-primitives#830 · 2 条评论 ·
维护者通常 1 天内回复
-
help wanted
难度 3/5 1-2 天 新手友好度 48/100
solidjs-community/solid-primitives#806 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
查看 solidjs-community/solid-primitives 的全部 Issue
相似的 Issue
-
The inspector never shows the instances field, so scaling out is unreachable可能已有人在做 @Mrkewl 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
xevrion/breakscale#96 ·
维护者通常 4 天内回复
-
Object parameters lose their structure when resources is enabled可能已有人在做 @asts-top 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
rossant/awesome-math#199 ·
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
jaegertracing/jaeger-ui#4618 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
mifi/lossless-cut#3125 ·
维护者通常 1 天内回复