I have created a component where I am getting Route name through window.location.pathname
it is working fine and gives me a route name but I want to remove forward slash /
from route name . I am beginner to ReactJS , Could someone please help me how to solve this problem ?
const pathName=window.location.pathname;