renderHook Server
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, react, typescript
- 领域
- frontend, testing-qa
调研方向
从提供的 @testing-library/react-hooks/server 示例开始,审查针对 @testing-library/react 所请求的 React 18 SSR 用法。确认应如何表示 renderHook、result 断言和 hydrate;完成意味着提供一个涵盖所示测试行为的清晰迁移示例。
由索引模型根据 Issue 内容生成。
描述
What is your question:
How can I migrate this code from @testing-library/react-hooks to @testing-library/react to use react18 and use the ssr environment?
old code
import { renderHook as renderHookSSR } from '@testing-library/react-hooks/server';
it('should ', () => {
const { result, hydrate } = renderHookSSR(() => true);
expect(result).toBe(true);
hydrate();
expect(result.current).toBe(true);
});
- 主要语言
- JavaScript
- 星标
- 19.7k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testing-library/react-testing-library 的其他 Issue
-
fireEvent.select does not wrap its automatic native focus in act可能已有人在做 @sergioperezcheco 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
-
bug: calling configure() without reactStrictMode resets it to undefined, silently disabling strict mode可能重新可做 @suhailopensource 于 76 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
testing-library/react-testing-library#1466 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
testing-library/react-testing-library#1459 · 2 条评论 ·
-
perf: optimize container lookup with early exit可能重新可做 @Ch-Abhinav-Chowdary 于 302 天前认领,目前没有进行中的 PR。 未关闭
难度 1/5 1 小时以内 新手友好度 35/100
testing-library/react-testing-library#1430 · 1 条评论 ·
-
`fireEvent.mouseEnter` does not forward `relatedTarget` (relatedTarget is the window instead)可能已有人在做 @swarnim02 于 319 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
查看 testing-library/react-testing-library 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
apache/rocketmq-dashboard#6610 ·
维护者通常 3 天内回复
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/CheatSheetSeries#2781 ·
维护者通常 1 天内回复
-
Hermes: /ponytail off never reaches the model, the ruleset stays active可能已有人在做 @szsunyuan 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
DietrichGebert/ponytail#1121 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
integrations plugin
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复