React-Intl How to use FormattedMessage in input placeholder

前端 未结 11 636
走了就别回头了
走了就别回头了 2020-12-13 03:20

I\'m unsure how to get the values from


into a placeholder format like input:<

11条回答
  •  暖寄归人
    2020-12-13 04:02

    You are trying to render a React component named FormattedMessage into a placeholder tag which is expecting a string.

    You should instead just create a function named FormattedMessage that returns a string into the placeholder.

    function FormattedMessage(props) {
        ...
    }
    
    
    

提交回复
热议问题