Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react js set default route

<Router history={history}>
              <div>
                <Route path="/">
                  <Redirect to="/Campaign"></Redirect>
                </Route>
                <Route path="/Campaign" component={CampaignLayout} />
                <Route path="/Error" component={Error500} />
                <Route path="/success" component={Success} />
              </div>
</Router>
 
PREVIOUS NEXT
Tagged: #react #js #set #default #route
ADD COMMENT
Topic
Name
9+1 =