Rename dangerouslySetInnerHTML to bravelySetInnerHTML#27704
Conversation
|
Hi @George3d6! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Comparing: aec521a...fbbfada Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
|
Thanks but we're going to keep the name the same. |
brave |
Summary
This pull request addresses the renaming of the variable dangerouslySetInnerHTML to bravelySetInnerHTML. The change aims to maintain clarity about the variable's purpose while adopting a more positive naming convention.
Changes
The original name, dangerouslySetInnerHTML, was intended to warn developers of the potential risks associated with directly manipulating HTML content. However, this naming can also impart a sense of fear or hesitation, which might not be conducive to a confident coding environment. The new name, bravelySetInnerHTML, continues to imply caution while also providing a feeling of heroism. As time passes without (detected) malicious script injections, it will invoke a sense of achievement when looking back on the codebase.
How did you test this change?
In the spirit of this PR I have not only avoided testing or running the changes, but the changes themselves were made using a command line script outputted by llama which I avoided verifying or even reading.