SHARE
TWEET

Untitled

a guest Aug 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MyClass extends React.Component {
  2.    static myText = "This is an example";
  3.    render() {
  4.      return <p>{MyClass.myText}</p>
  5.    }
  6. }
  7.  
  8. vs
  9.  
  10. const myText = "This is an example";
  11. class MyClass extends React.Component {
  12.    render() {
  13.      return <p>{myText}</p>
  14.    }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top