JavaScript Coding Standards

React in KFS

React Page Standards

New pages should be implemented within the scope of the base React Router.  By doing this, we hope to only have a single entry point into the client-side experience, reducing the reliance on jsps and tags, and reducing the number of page refreshes required to navigate the system.


Router setup
// In the WebApp component, add your route inside the existing BrowserRouter
<BrowserRouter>
	<div>
    	<Route
        	name='yourPage'
            path='/path/to/page'
            component={YourComponent}
        />
	</div>
</BrowserRouter>