makotot/react-scrollspy

Failed prop type issue

gandreadis opened this issue · 3 comments

I'm trying to pass a custom component to the Scrollspy as enclosing component. I pass to it the component name (like so: componentTag={MyComponent}). It renders properly, but when I look in the console, I see this error message:

Warning: Failed prop type: Invalid prop `componentTag` supplied to `Scrollspy`.

I've also tried passing an instantiated component (<MyComponent/>), but that fails entirely, even before rendering.

I have looked in this codebase, and I see that the type of this is either a string or element (see here). Should this maybe be an elementType, instead? And if not, do you have any suggestions for how I can fix the issue in my own codebase?

urish commented

Facing the same issue, and seems like @gandreadis's workaround did the trick. I'm using patch-package to automatically apply the patch after every npm install:

wokwi/good-arduino-code@ca62389#diff-b9e7517c5528b338b849379647e48a9f

urish commented

Related PR: #165

Thanks for the update! That fixes it :)