javascript - How to combine ReactJs Router Link and material-ui components (like a button)? -


i need find solution able combine functionality of react router material ui components.

for instance, i've scenario: router , button. tried mix them together, , restyle them.

so simple link

<link classname={this.getclass(this.props.type)} to={`${url}`} title={name}>{name}</link> 

i tried create material ui button following

<link classname={this.getclass(this.props.type)} to={`${url}`} title={name}>   <flatbutton label={name} /> </link> 

but have following error , javascript breaks

invariant.js?4599:38uncaught invariant violation: addcomponentasrefto(...): reactowner can have refs. might adding ref component not created inside component's render method, or have multiple copies of react loaded (details: https://gist.github.com/jimfb/4faa6cbfb1ef476bd105).

do have idea how manage situation? thank in advance , if need more information let me know

this works me:

<flatbutton label="details"              containerelement={<link to="/coder-details" />}              linkbutton={true} /> 

see https://github.com/callemall/material-ui/issues/850


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -