1分で出来るuuidの使い方!
親の顔より見た
Warning: Each child in a list should have a unique “key” prop.
のエラー。
こちらはkeyにuuidつけて解決しましょう。
まずは
npm install uuid
でインストール。そしたら
import { v4 as uuidv4 } from 'uuid';
として、使うとこには
id: uuidv4()
としましょう。めっちゃ簡単。
親の顔より見た
Warning: Each child in a list should have a unique “key” prop.
のエラー。
こちらはkeyにuuidつけて解決しましょう。
まずは
npm install uuid
でインストール。そしたら
として、使うとこには
としましょう。めっちゃ簡単。