Masahiro Okubo

Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + ‘em’}} when using JSX.

Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + ‘em’}} when using JSX.

Reactでタイトルのエラーが発生

styleを{{}}で囲うで対処しました

<h4 style={ { border: 'none' } }></h4>

参考記事

React inline style – style prop expects a mapping from style properties to values, not a string


関連記事

copyright© 2016-2021 Masahiro Okubo