FormattedMessage is used in properties

when the framework uses antd and uses Input components, I need to display multiple languages in the placeholder property

the code is as follows:

<Search
    placeholder={<FormattedMessage id="S_T"/>}
    enterButton="Search"
    size="large"
    onSearch={value => console.log(value)}
    style={{height: "40px"}}
  />

when you use < FormattedMessage id= "slide" / > in the property, the page renders an object as shown in the following figure:

clipboard.png

Aug.30,2021

placeholder accepts strings, FormattedMessage this should be a component, if you want to achieve dynamic display of placeholder content, it is recommended to use a variable or function to achieve


you this is a component, directly write it, display no, multi-language is not a language pack, each language pack corresponding to an object data, with objects. Property method binding is fine.


Please refer to https://github.com/yahoo/reac., as follows

<FormattedMessage id="title">
    {(txt) => (
        <H1>
            {txt}
        </H1>
    )}
</FormattedMessage>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb14af-48107.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb14af-48107.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?