Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Add base url to react router for gh-pages deployment

import BrowserRouter from 'react-router-dom/BrowserRouter'

ReactDOM.render((
   <BrowserRouter basename={process.env.PUBLIC_URL}>
     <App />
   </BrowserRouter>
), ...)  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Add #base #url #react #router #deployment
ADD COMMENT
Topic
Name
6+4 =