当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Materialize a href buttons inside a React Router Link Component

问题描述:

I'm trying to use materialize.css to stylize a signup button. Materialize creates buttons using the anchor tag e.g

<a class="waves-effect waves-light btn">Button</a>

which renders this:

Currently I'm using this in a Meteor project using react-router and trying to wrap a react-router < Link > component around it

<Link to="signup"><a className="waves-effect waves-light btn blue-grey darken-1"><i className="material-icons left">cloud</i>Register Here!</a></Link>

With this implementation I'm getting this dom warning:

"Warning: validateDOMNesting(...): cannot appear as a descendant of . See App > Link > a > ... > a."

How would I go about getting around this?

分享给朋友:
您可能感兴趣的文章:
随机阅读: