teslamotors / informed

A lightweight framework and utility for building powerful forms in React applications
https://teslamotors.github.io/informed
MIT License
951 stars 173 forks source link

Dynamic fields - bug when field props changed #53

Closed dzwiedziu-nkg closed 5 years ago

dzwiedziu-nkg commented 6 years ago

During writing example for #49 I saw bug when field is not recreating but only field name is changed.

Simple example: https://dzwiedziu-nkg.github.io/test-react-informed/ Source: https://github.com/dzwiedziu-nkg/test-react-informed

Bug: field store old value when field props changed.

It happen when we use conditional renders i.e. my example. React use Virtual DOM. Before unomunt and mount new component's instances try to update only props. React create new instance or discard component only when there's no other way.

joepuzzo commented 5 years ago

V2 is in progress and this is priority!

joepuzzo commented 5 years ago

Check out V2!!!