app.js
import React, {useRef, useEffect, useState} from 'react'
import {Link} from 'react-router-dom'
// React -> will re-render (props/state)
export default function Home(props){
// Google Captcha
const h1Ref = useRef()
const [counter, setCounter] = useState(0)
const [counter2, setCounter2] = useState(0)
useEffect(() =>{
//fetching course information -> when the URL changes
console.log(h1Ref)
}, [counter2])
return (
<div ref={h1Ref}>
<h1>{counter}</h1>
<h1>{counter2}</h1>
<button onClick={ ()=> setCounter(counter => counter+1)}> Counter 1</button>
<button onClick={ ()=> setCounter2(counter => counter+1)}> Counter 2</button>
</div>
)
}