React
redux-form

redux-formのinput type="radio" buttonではまったこと

More than 1 year has passed since last update.

何度も忘れるので自分用メモ
redux-formでtype="radio"のvalueの値は数値では動かない。redux-formのバグ?

SampleData
const items = [
  {
    name: "neko",
    value: 123
  },
  {
    name: "mike",
    value: 456
  }
]
NG-Code
items.map((item, i) =>
  <label key={i}><Field name="select" component="input" type="radio" value={item.value} />{item.name}</label>
)
OK-Code
items.map((item, i) =>
  <label key={i}><Field name="select" component="input" type="radio" value={`${item.value}`} />{item.name}</label>
)