react-component / react-component/field-form

getFieldValue和getFieldsValue有什么本质上的区别吗

Open
#331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
286
Avg merge
4d 16h
Merged PRs (30d)
1

Description

抛去类型校验,getFieldValue() 不传参数时的效果和 getFieldsValue(true) 可以说是一模一样,所以为什么要分成两个方法,而且 getFieldsValue(true) 获取出来的数据是组件内部维护的store,getFieldsValue(namePath) 又是一个新对象,导致用户在对传true获取到的数据进行一定操作时甚至会影响到视图,为什么不都返回一个即时的新对象?希望大佬给小弟解惑一下这些操作不是徒增心智负担🥺

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the getFieldValue and getFieldsValue API entry points and compare their documented behavior with the form store semantics. Verify the returned-value and mutation differences described in the issue, then document the distinction and explain when each API is appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.