airbnb / visx

🐯 visx | visualization components
https://airbnb.io/visx
MIT License
19.56k stars 719 forks source link

TypeError: (0 , _web.useTransition) is not a function #1725

Open adley-kim opened 1 year ago

adley-kim commented 1 year ago

I've been using xychart@^2.16.0 for months now without issue, but yesterday I began receiving the following error:

TypeError: (0 , _web.useTransition) is not a function at AnimatedGridLines (AnimatedGridLines.js:21:1)

The same error is also thrown by the AnimatedTicks.

Happy to provide more info.

williaster commented 1 year ago

Hi @adley-kim , thanks for checking out visx. Can you link to a sandbox or something reproducible to help debug this?

LoiKos commented 1 year ago

Hi, I just encountered this error while trying to update my project from "@react-spring/web": "9.7.2", to "@react-spring/web": "9.7.3",.

I'm sorry i have no idea what is causing this. Supposed i will stick to 9.7.2 for now.

thedumbterminal commented 1 year ago

receiving the same problem with this code, which worked fine before:

https://github.com/thedumbterminal/ci-speed-ui/blob/main/src/components/BarChart.tsx

williaster commented 1 year ago

maybe this was a breaking change released as a patch in react-spring? might be worth opening an issue there, or locking your deps to 9.7.2 for now.

thomasmost commented 1 year ago

FWIW, I just also encountered this and I'm not using react-spring

my package.json :

{
  "name": "my-app",
  "version": "0.2.0",
  "private": true,
  "packageManager": "pnpm@8.10.0",
  "dependencies": {
    "@emotion/styled": "^11.11.0",
    "@mui/material": "^5.14.18",
    "@netlify/functions": "^0.10.0",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "@types/jest": "^26.0.24",
    "@types/node": "^12.20.55",
    "@types/react": "^18.2.37",
    "@types/react-dom": "^18.2.15",
    "@visx/curve": "^3.3.0",
    "@visx/event": "^3.3.0",
    "@visx/legend": "^3.5.0",
    "@visx/scale": "^3.5.0",
    "@visx/tooltip": "^3.3.0",
    "@visx/xychart": "^3.5.0",
    "d3-array": "^3.2.4",
    "dotenv": "^10.0.0",
    "google-spreadsheet": "^3.3.0",
    "history": "^5.3.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.19.0",
    "react-scripts": "5.0.1",
    "typescript": "^5.2.2",
    "web-vitals": "^1.1.2"
  },
  "scripts": {
    "dev": "netlify dev",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "preinstall": "npx only-allow pnpm",
    "prepare": "husky install"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": "eslint --cache --fix --max-warnings=3",
    "*.{js,ts,jsx,tsx,css,md,yml,json,html}": "prettier --write"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@types/google-spreadsheet": "^3.3.2",
    "husky": "^7.0.4",
    "lint-staged": "^12.5.0",
    "netlify-cli": "^17.4.0",
    "prettier": "^2.8.8"
  }
}
Fanzzzd commented 16 hours ago

Still have the same problem