react-scroll
react-scroll copied to clipboard
"parentbindings" causing test warning / showing up in html when using HOC
I created my own Element to directly use a list item tag:
const ListElement: React.FC = ({ children, ...props }) => {
return <li {...props}>{children}</li>;
};
const ScrollListElement = ScrollElement(ListElement);
// ...
<ScrollListElement
key={id}
name={scrollBaseName + id}
>
// ...
</ScrollListElement>
But now my li tag also has a "parentbindings" property:
<li name="scroll-123" parentbindings="[object Object]">
This is also issuing a warning in tests:
Warning: React does not recognize the
parentBindingsprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercaseparentbindingsinstead. If you accidentally passed it from a parent component, remove it from the DOM element.
What is the reason for this? Can this be fixed in the library? I would be open to implement this but I would need some guidance.