Install Locator on React codebase. This is DevTools variant which is preffered solution. Alternative is data-id solution.
npm install -D @locator/runtime
Add this to pages/_app.jsx (or other global file):import setupLocatorUI from "@locator/runtime";
if (process.env.NODE_ENV === "development") {
setupLocatorUI();
}
{
"presets": ["@babel/preset-react"],
"plugins": [
"@babel/plugin-transform-react-jsx-self",
"@babel/plugin-transform-react-jsx-source"
]
}