I have a state and depending if it's true or false I show a different svg icon, although I noticed switching between the state caused this error to appear: Warning: React instrumentation encountered an error: Error: Could not find ID for Fiber "SvgCheck", I have my icons in a public/static/icons, all svg files are here and then I have index.js where I import those icons and then export like
import Check from './check.svg'
export {
...
Check,
}
Then I am importing them as:
import {Check} from "public/static/icons"
and I use them as <Check/>
to allow me to use it like this I am using svgr plugin in next.config.js I have:
module.exports = {
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"]
});
return config;
}
};
I only started getting this warning recently and never saw it before.