Problem: There is A public component A whose parent component B renders A by iterating through the array. Dynamic addition or deletion of an array is the same as dynamic addition or deletion of component A. The problem is that the user is responsible for adding and deleting, so there is no way to give a fixed key at the beginning. In the beginning, index is used as the key value, but adding or deleting components will refresh the key value of previous components, resulting in the state cannot be preserved.
solution:
br> a>
>
Read More:
- Keep alive in Vue
- Higher order components in react
- The element “extra pin The solution of “in normal of part” warning
- Attempted import error: ‘injectglobal’ is not exported from ‘styled components’
- Solve the problem of showing unregistered (unknown custom element) when importing components into Ant Design Pro
- Lua — using remove to delete table data
- Index error: invalid index to scalar variable
- SAP development and error reporting: 500 SAP internal server error (TE rmination:RABAX_ STATE)
- Module build failed: SyntaxError: Unexpected token
- Cause of runtime error on OJ
- Lock wait timeout exceeded — transaction and index
- Vue error: did you register the component correctly? For.., make sure to provide the “name” option (solved)
- Python error: typeerror: ‘Int’ object is not subscribable
- Python reported error: typeerror:’int’object is not subscriptable
- The difference between “?” and “?:” introduced by php7
- Android 4.1:Entry name ‘classes.dex‘ collided
- Eclipse Maven package error
- Linux command line cursor moving skills
- @Solution to override error