Last active
October 28, 2019 10:18
-
-
Save rajeshpillai/3c3d7515cd226d5eb24c529c7f404693 to your computer and use it in GitHub Desktop.
Revisions
-
rajeshpillai revised this gist
Oct 28, 2019 . 1 changed file with 0 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,3 @@ const {useState, useEffect} = React; function Counter() { -
rajeshpillai created this gist
Oct 28, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ /* Use import if you are running it as create-react-app or using babel. import React, {useState} from 'react'; */ const {useState, useEffect} = React; function Counter() { const [counter, setCounter] = useState(0); return ( <div className="content"> <h1 className="count">{counter}</h1> </div> ); } const root=document.querySelector("#root"); ReactDOM.render(<Counter/>, root);