Check if element exists in jQuery

$(‘elemId’).length doesn’t work for me. You need to put # before element id: With vanilla JavaScript, you don’t need the hash (#) e.g. document.getElementById(‘id_here’) , however when using jQuery, you do need to put hash to target elements based on id just like CSS.

You should not use Route or withRouter() outside a Router when using react-router 4 and styled-component in react

I’m trying to build my first portfolio website and got stuck in routing using react-router-dom 4.2.2 and styled-components 2.2.3. error message: You should not use Route or withRouter() outside a Router I also try using Link instead of NavLink but got error too(You should not use Link outside a Router) Someone help me please. navigationBar.js navigationBar.style.js