0

My react router code is like this.

render() {
    return (
      <HashRouter>
        <DesignerHeader currentPath={} >
          <Switch>
            <Route
              exact
              path="/"
              render={() => <Redirect to={ROUTE_PATH.TRANSACTION_LIST} />
              }
            />
            <Route
              exact
              path='/Subject'
              render={(props) => <DesignerWithSubject {...props} />
              }
            />
            <Route
              exact
              path='/Designer'
              render={(props) => <Designer {...props} />
              }
            />
            <Route
              exact
              path='/Name'
              render={(props) => <DesignerWithName {...props} />
              }
            />                           
          </Switch>
        </DesignerHeader>

      </HashRouter>
    )}

In this I have to currentPath to DesignerHeader how i can approach that? i am using react router 4.

Roli Agrawal
  • 2,356
  • 3
  • 23
  • 28

0 Answers0