Learn about the usage of dangerouslySetInnerHTML in React and how to safely use it. Avoid using it unless necessary and always sanitize the HTML before setting it with dangerouslySetInnerHTML.
•10m read time• From deadsimplechat.com
Table of contents
Basic Usage ExampleSanitizing with DOMPurifyAlternatives to Consider before using dangerouslySetInnerHTMLScenarios where dangerouslySetInnerHTML could be usedBuilding a Markdown Editor in React using ShowDown, DOMPurify and dangerouslySetInnerHTMLBuilding MarkDownViewerBuilding the EditorPutting it all togetherDemoPerformance impact of usingMetered TURN serversConclusion1 Comment
Sort: