Open malaccan opened 1 year ago
you should add a unique key or id to every div when you are rendering your div
even with the keys added, react gives the same warning error. it can be reproduced with this example:
<AIWriter>
<div key="1">some word</div>
<div key="2">more text</div>
</AIWriter>
produces error:
[Error] Warning: Each child in a list should have a unique "key" prop.
See https://reactjs.org/link/warning-keys for more information.
the error goes away only if there is a single <div>
component within the <AIWriter>
block. however, AIWriter does not process <br/>
for line breaks, so trying to replace multiple <div>
with <br/>
doesn't work as well.
thanks
AIWriter works awesome, but it gives the warning below when i use multiple tags like this:
[Error] Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.