You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -334,6 +334,7 @@
334
334
|318|[Should I learn ES6 before learning ReactJS?](#should-i-learn-es6-before-learning-reactjs)|
335
335
|319|[What is Concurrent Rendering?](#what-is-concurrent-rendering)|
336
336
|320|[What is the difference between async mode and concurrent mode?](#what-is-the-difference-between-async-mode-and-concurrent-mode)|
337
+
|321|[Can I use javascript urls in react16.9?](#can-i-use-javascript-urls-in-react16.9)|
337
338
338
339
## Core React
339
340
@@ -5251,3 +5252,13 @@
5251
5252
```
5252
5253
320. ### What is the difference between async mode and concurrent mode?
5253
5254
Both refers the same thing. Previously concurrent Mode being referred to as "Async Mode" by React team. The name has been changed to highlight React’s ability to perform work on different priority levels. So it avoids the confusion from other approaches to Async Rendering.
5255
+
321. ### Can I use javascript urls in react16.9?
5256
+
Yes, you can use javascript: URLs but it will log a warning in the console. Because URLs starting with javascript: are dangerous by including unsanitized output in a tag like <a href> and create a security hole.
5257
+
```javascript
5258
+
constcompanyProfile= {
5259
+
website:"javascript: alert('Your website is hacked')",
5260
+
};
5261
+
// It will log a warning
5262
+
<a href={companyProfile.website}>More details</a>
5263
+
```
5264
+
Remember that the future versions will throw an error for javascript URLs.
0 commit comments