profile
viewpoint

Ask questionsPrevent javascript URLs warning in React 16.9

@salesforce/design-system-react@0.10.12

React 16.9 emits the following warning:

Warning: A future version of React will block javascript: URLs as a security precaution. Use event 
handlers instead if you can. If you need to generate unsafe HTML try using 
dangerouslySetInnerHTML instead. React was passed "javascript:void(0);".

See facebook/react#16592 for the feature issue And some related discussions here: facebook/react#16382

salesforce/design-system-react

Answer questions xoob

Just a heads-up, this is causing npm run test:unit to fail hard.

  SLDSAlert:
    Dismiss alert
      ✗ "before each" hook: mountComponentInside for "calls onRequestClose handler"
	Error: Warning: A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.%s
useful!

Related questions

Detect if canvas exists before calling Browser canvas hot 1
Github User Rank List