infi-pc / locatorjs

https://www.locatorjs.com
1.31k stars 60 forks source link

bug: unable to locate elements using react canary release 18.3.0-canary-338dddc08-20240307 #148

Open sourcec0de opened 6 months ago

sourcec0de commented 6 months ago

Where the bug happens

your browser

Chrome

Describe the bug

Hello 👋 Amazing tool, thank you for all the hard work!

We bumped into an issue where locator doesn't work with a react canary release.

A simple way to reproduce this is to use remix, vite, and react 18.3 canary. There is a flash of unstyled content issue that is resolved in this release, unfortunately locator doesn't work with this version of react.

Downgrading to react 18.2.0 resolves the issue.

{
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "remix dev:vite",
  },
  "dependencies": {
    "@remix-run/dev": "^2.8.1",
    "@remix-run/express": "^2.8.1",
    "@remix-run/node": "^2.8.1",
    "@remix-run/react": "^2.8.1",
    "react": "18.3.0-canary-338dddc08-20240307",
    "react-dom": "18.3.0-canary-338dddc08-20240307",
    "vite": "^5.1.5"
  },
  "overrides": {
    "react": "18.3.0-canary-338dddc08-20240307",
    "react-dom": "18.3.0-canary-338dddc08-20240307"
  }
}