rafgraph / react-router-hash-link

Hash link scroll functionality for React Router
https://react-router-hash-link.rafgraph.dev
MIT License
732 stars 62 forks source link

React-Router-Hash-Link cannot resolve the library when using NPM and typescript. #106

Open cannibalisticwalrus opened 1 year ago

cannibalisticwalrus commented 1 year ago

import { HashLink } from 'react-router-hash-link';

The import is as above and it was installed using NPM and @types


I believe it is highly likely that I am doing something wrong but I cannot identify what.

scarabaeus commented 9 months ago

Install @types/react-router-hash-link (npm/yarn) and save it to your package.json devDependencies

marki1an commented 6 months ago

It helps me, thanks @scarabaeus

  "devDependencies": {
    "@types/react-router-hash-link": "^2.4.9",
  },