use strict in react code example

Example 1: javascript use strict

// Whole-Script Strict Mode Syntax
'use strict';
var v = "Hi! I'm a strict mode script!";

Example 2: use strict javascript

// File: myscript.js

'use strict';
var a = 2;
....

Example 3: react strict mode

import React from 'react';

function ExampleApplication() {
  return (
    <div>
      <Header />
      <React.StrictMode>        <div>
          <ComponentOne />
          <ComponentTwo />
        </div>
      </React.StrictMode>      <Footer />
    </div>
  );
}

Example 4: use strict javascript

// Non-strict code...

(function(){
  "use strict";

  // Define your library strictly...
})();

// Non-strict code...