title: Using Tag to pass a attribute inside NavLink reactstrap component
body: <p>Can someone help me to figure out what can be the significance of passing the Link tag inside the NavLink component like this :</p>
  
  <pre><code>&lt;NavLink tag={Link} to="/components/" activeClassName="active"&gt;Components&lt;/NavLink&gt;
  </code></pre>
  
  <p>The code for NavLink (reactstrap component) is given below :</p>
  
  <pre><code>import PropTypes from 'prop-types';
  import classNames from 'classnames';
  import { mapToCssModules, tagPropType } from './utils';
  
  const propTypes = {
    tag: tagPropType,
    innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
    disabled: PropTypes.bool,
    active: PropTypes.bool,
    className: PropTypes.string,
    cssModule: PropTypes.object,
    onClick: PropTypes.func,
    href: PropTypes.any,
  };
  
  const defaultProps = {
    tag: 'a',
  };
  
  class NavLink extends React.Component {
    constructor(props) {
      super(props);
  
      this.onClick = this.onClick.bind(this);
    }
  
    onClick(e) {
      if (this.props.disabled) {
        e.preventDefault();
        return;
      }
  
      if (this.props.href === '#') {
        e.preventDefault();
      }
  
      if (this.props.onClick) {
        this.props.onClick(e);
      }
    }
  
    render() {
      let {
        className,
        cssModule,
        active,
        tag: Tag,
        innerRef,
        ...attributes
      } = this.props;
  
      const classes = mapToCssModules(classNames(
        className,
        'nav-link',
        {
          disabled: attributes.disabled,
          active: active
        }
      ), cssModule);
  
      return (
        &lt;Tag {...attributes} ref={innerRef} onClick={this.onClick} className={classes} /&gt;
      );
    }
  }
  
  NavLink.propTypes = propTypes;
  NavLink.defaultProps = defaultProps;
  
  export default NavLink;
  </code></pre>
  
  <p>Here you can see that the NavLink returns a component wrapped inside the tag we passed as props. The basic function of Link (react-router component) i.e routing the components is not accomplished here. So passing it as a prop for NavLink is confusing me.</p>