Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link don't change view #448

Open
joneldiablo opened this issue Jan 13, 2021 · 0 comments
Open

Link don't change view #448

joneldiablo opened this issue Jan 13, 2021 · 0 comments

Comments

@joneldiablo
Copy link

Hi, I'm using Link component to navigate but not working, the uri change, the path change but the view do nothing, I'm using react 17+

import React from 'react';
import { Link } from '@reach/router';

export default class TestBusinessView extends React.Component {
  
  onClick = (e) => {
    e.preventDefault();
    navigate(e.target.href);
  }
  
  render() {
    const { uri } = this.props;
    return <div>
      <div><Link to={`${uri}/parent-enterprise`} onClick={this.onClick}>Parent enterprise</Link></div>
    </div>;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant