Archives : January-2018

I have a child component: import * as React from ‘react’; import Select from ‘react-select’; import { Link } from ‘react-router-dom’; import { Button } from ‘../controls/Button/Button’; import { ISelectedItem } from ‘../../interfaces/ISelectedItem’; import * as service from “../../helpers/service”; export interface IProps{ onClickRender: (selectedItem: ISelectedItem) => void; } export interface IState { customerData: ISelectedItem[]; selectedItem: ..

Read more

I was using the following code from an online course for React routing: import { Router, Route, browserHistory } from ‘react-router’; ReactDOM.render( <Router history={browserHistory}> <Route path=”/” component={App></Route> <Route path=”/One” component={One}></Route> <Route path=”/Two” component={Two}></Route> </Router>, document.getElementById(‘root’)); It gave me a following error ‘react-router’ does not contain an export named ‘browserHistory’. I did some research and found ..

Read more

I want the page to scroll down to my anchor tags when a user navigates to it through an anchor link. I’m using react-router 4 and I’ve defined things as follows: navbar: export default (props) => { const { updateModal, updateRoute, } = props return( <Navbar fluid collapseOnSelect> <Nav> <NavDropdown eventKey=”4″ title=”Solutions” id=”nav-dropdown” noCaret> <MenuItem ..

Read more