New definition of uncontrolled components?
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 11.8k
- Forks
- 7.9k
- Merge médio
- 1d 11h
- PRs com merge (30d)
- 11
Descrição
I was reading the new documentation for useRef, saw an overcomplicated example, made a PR where I wanted to reference the new docs for uncontrolled components, but for some reason the definition has completely changed from the original docs.
In my opinion, the new definition is wrong. An uncontrolled component is a component where the value is not stored by react at all, but rather stored natively in the DOM element.
The new docs state
It is common to call a component with some local state “uncontrolled”. For example, the original Panel component with an isActive state variable is uncontrolled because its parent cannot influence whether the panel is active or not.
The definiton from old docs:
In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by the DOM itself.
new docs
- https://beta.reactjs.org/learn/sharing-state-between-components#controlled-and-uncontrolled-components
- https://beta.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state#recommendation-fully-uncontrolled-component-with-a-key
Old docs:
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Compare as definições na documentação de useRef, na página “Sharing State Between Components”, na publicação do blog de 2018 sobre derived-state e na documentação antiga sobre uncontrolled-components. Determine se a terminologia deve ser alinhada e, em seguida, atualize a documentação afetada e suas referências para que a definição e os exemplos sejam consistentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, react
- Domínio
- documentation
- Tipo de issue
- Documentação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100