Blocks – createElement – add key or not
-
Hi,
I’m working on my first block.
It’s not clear to me whether I should add akey
or not, when creating an element in React. Example:React.createElement('a', { key: "my-key", href: "my-url", target: "_blank" }, 'My label')
I do find info online about using
key
when creating a select field (= multiple option values). That I understand.
But also in case of a simple input field? Or when static content is returned such as my example above?Guido
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Blocks – createElement – add key or not’ is closed to new replies.