Can I modify context directly within the render function of the react component?

like this:

render() {
  this.context.antLocale.locale = this.props.lng
  return <div></div>
}

it is possible to write in this way, but I don"t know whether it conforms to the specification

.
May.10,2022

No, just like you write setState in render .

if you want to modify context , you need to pass down the method that modifies context and modify it elsewhere.

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-1b4049e-2c4f5.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-1b4049e-2c4f5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?