Archives : September-2017

I am using react-redux connect function with withRouter function, and also I am trying to use compose() here. This is the code: export default compose ( withRouter, connect(mapStateToProps) )(Dashboard); But I receive the next error: Uncaught TypeError: Converting circular structure to JSON at Object.stringify (<anonymous>) at wrapWithConnect (connectAdvanced.js:84) at applyFunctor (index.js:124) at index.js:144 at Array.reduce ..

Read more

<RaisedButton containerElement={NavLink} to=”/somewhere”> Somewhere </RaisedButton> Produces the following warning: Warning: Failed prop type: Invalid prop `containerElement` supplied to `RaisedButton`. in RaisedButton (at App.js:11) in App (at index.js:23) in Provider (at index.js:22) in MuiThemeProvider (at index.js:21) but the Navlink properly renders and redirects to /somewhere on click. If this is a deprecated prop that still works ..

Read more

I have the following code: <NavLink to=”//student.lvh.me:8080/users/edit”> <DropDownLink>Wiki</DropDownLink> </NavLink> how do I get navlink to work with external URLs? I get the following error in console: Uncaught DOMException: Failed to execute ‘pushState’ on ‘History’: A history state object with URL ‘http://student.lvh.me:8080/users/edit’ cannot be created in a document with origin ‘http://localhost:3000’ and URL ‘http://localhost:3000/’. is there ..

Read more

So, in react-router v4, my Route looks like this: <Route path=”/suppliers/:id?” component={Suppliers} /> I’m passing an optional ‘id’ parameter to my Suppliers component. This is no problem. For posterity, this is my Link: <Link to=”/suppliers/123″>Place Order</Link> Then, in my component, I refer to the parameter as such: <p>{this.props.match.params.id}</p> This works, but my linter gives me ..

Read more