How React helps in mitigating Cross-Site Scripting (XSS) attack

A good article to understand the XSS attack: https://medium.com/@charithra/introduction-to-xss-e9eb90b4323d

JSX Prevents Injection Attacks

It is safe to embed user input in JSX:

const title = response.potentiallyMaliciousInput;
// This is safe:
const element = <h1>{title}</h1>;

Suffering from Knowledge Quest

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store