import './Header.scss';
import React from 'react';
const menuBtn = document.querySelector('.btn');
console.log(menuBtn);
function Header() {
return (
<>
<div className="menu">
<div className="btn">
{/* ... */}
</div>
</>
);
}
export default Header;
const menuBtn = document.querySelector('.btn');
console.log(menuBtn);
const menuBtn = document.querySelector('.btn');
console.log(menuBtn);
function Header()
class Header extends React.Component {
componentDidMount() {
const menuBtn = document.querySelector('.btn');
console.log(menuBtn);
}
render() {
return (
<>
<div className="menu">
<div className="btn">
{/* ... */}
</div>
</>
)
}
}
export default Header;