Why are Octal numeric literals not allowed in strict mode (and what is the workaround?)

Octal literals are not allowed because disallowing them discourages programmers from using leading zeros as padding in a script. For example, look at the following snippet: var eight = 0008, nine = 00009, ten = 000010, eleven = 011; console.log(eight, nine, ten, eleven); Seems harmless enough, right? We programmers with OCD just want to align … Read more

Should I ‘use strict’ for every single javascript function I write?

On this question, do beware a general tendency to oversimplify. First, all of your code absolutely should be run in strict mode. Core modern javascript functionality is changed (see .call() and apply()) or disfigured (silent Errors) by executing code outside of strict mode. (More on this here, from Crockford.) However, that doesn’t address how you … Read more

Why is body.scrollTop deprecated?

It’s Chrome’s own incorrect behavior that is deprecated, and they’re warning authors to stop relying on it. The scrolling viewport is represented by document.documentElement (<html>) in standards mode or <body> in quirks mode. (Quirks mode emulates the document rendering of Navigator 4 and Explorer 5.) Chrome uses body.scrollTop to represent the viewport’s scroll position in … Read more

Can I disable ECMAscript strict mode for specific functions?

No, you can’t disable strict mode per function. It’s important to understand that strict mode works lexically; meaning — it affects function declaration, not execution. Any function declared within strict code becomes a strict function itself. But not any function called from within strict code is necessarily strict: (function(sloppy) { “use strict”; function strict() { … Read more

Is there any way to check if strict mode is enforced?

The fact that this inside a function called in the global context will not point to the global object can be used to detect strict mode: var isStrict = (function() { return !this; })(); Demo: > echo ‘”use strict”; var isStrict = (function() { return !this; })(); console.log(isStrict);’ | node true > echo ‘var isStrict … Read more

material-ui Drawer – findDOMNode is deprecated in StrictMode

According to Material-ui changelog, it should be solve in V5, which is still in alpha. It seems that at least in some cases this issue cause by createMuiTheme. You can solve this issue by using the experimental (unstable) theme creator If you want to get the experimental theme creator instead of removing React.StrictMode, you can … Read more

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode

In index.js change <React.StrictMode><App /><React.StrictMode> to <App /> and you will not see this warning. Please note that strict mode helps you with Identifying components with unsafe lifecycles Warning about legacy string ref API usage Warning about deprecated findDOMNode usage Detecting unexpected side effects Detecting legacy context API Please refer to https://reactjs.org/docs/strict-mode.html before removing it.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)