popcodeorg / popcodeorg/popcode

Refactor instructions editor to follow controlled component pattern

未关闭
#1,397 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

code quality
主要语言
JavaScript
星标
191
派生
143
平均合并
4 天 11 小时
30 天内合并 PR
5

描述

Currently the instructions editor is an uncontrolled component, which is to say that intermediate in-progress editing state is stored only in the DOM.

React officially recommends using controlled components instead, which stores intermediate state in React (in our case Redux) state, and has the form value mirror the props given. This is probably the right approach here (but maybe it’s not! Further research may be called for).

Probably best not to sweat this too much until #1394 is done (or at least concurrently with that task).

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先查看 instructions editor 以及链接的 React controlled components 文档,然后检查 #1394 会如何影响这项工作。当中间编辑状态存储在 React 或 Redux state 中,并且表单值与其 props 保持一致时,重构就完成了。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react, redux
领域
frontend
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。