Issue with Element and ScrollLink
See original GitHub issueI have the following error when trying to use either in JSX:
'Element' cannot be used as a JSX component.
Its instance type 'Element' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Simple code:
import { Element } from 'react-scroll';
.
.
.
return (
<Element className={classes['sellersSectionInner']} name="sellerSection">
x
</Element>
);
Versions:
"react": "18.0.0",
"react-dom": "18.0.0",
"react-scroll": "1.8.6",
"@types/react": "18.0.2",
"@types/react-dom": "18.0.0",
"@types/react-scroll": "1.8.3",
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Newbie: Trouble combining element scroll with link scraping
I'm a newbie and am unable to get the start URL page to scroll to the end and then to send each of...
Read more >Div anchors scrolling too far - Stack Overflow
So scroll-margin-top: 20px; on an element means that clicking an anchor tag for that element will scroll the page to 20px above the...
Read more >Overflow Issues In CSS - Smashing Magazine
An overflow issue occurs when a horizontal scrollbar unintentionally appears on a web page, allowing the user to scroll horizontally. It can be ......
Read more >Scroll.Link not working unless a component's inner parent ...
Using Scroll.Link and setting the name attribute on my components in App.js was not working for me until I set an id attribute...
Read more >scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
Note that any other scrolls, such as those performed by the user, are not affected by this property. When this property is specified...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No sorry, it has not been fixed… I must have forgotten it.
Will try to fix this asap, will also accept PR’s if someone solves it before me 😃