bug: Wouter compat
See original GitHub issueDescribe the bug Wouter errors when integrated into a Million/React environment
To Reproduce
import { createRoot, useState } from 'million/react';
import { Link, Route } from 'wouter';
function App() {
const [count, setCount] = useState(0);
return (
<div>
<button onClick={() => setCount(count + 1)}>{count}</button>
<Link href="/users/1">
<a className="link">Profile</a>
</Link>
<Route path="/about">About Us</Route>
<Route path="/users/:name">{(params) => <div>Hello, {params.name}!</div>}</Route>
</div>
);
}
createRoot(document.body).render(<App />);
Gives something like this:
wouter.js?v=b667f2ca:1129 Uncaught TypeError: Cannot read properties of null (reading 'i')
at useRef (wouter.js?v=b667f2ca:1129:14)
at useNavigate (wouter.js?v=b667f2ca:1636:18)
at Link (wouter.js?v=b667f2ca:1659:18)
at compat.ts:15:17
at hook2 (hooks.ts:37:17)
at Object.createComponent [as handleFunction] (compat.ts:39:4)
at Object.h (h.ts:45:14)
at App (script.tsx:15:19)
at compat.ts:15:17
at hook2 (hooks.ts:37:17)
Expected behavior
Should behave as Wouter intends it to
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Issues · aidenybai/million - GitHub
bug: benchmarks become skewed with vnode adapters bug Something isn't working. #232 opened on Aug 1 by aidenybai · @aidenybai · bug: Wouter...
Read more >Wouter - Medium
Read writing from Wouter on Medium. Proud owner of wouterplanet.com. Every day, Wouter and thousands of other voices read, write, and share important ......
Read more >Show StackBlitz Examples
Browse StackBlitz projects using wouter, crack open the code and start editing in your ... Run Million Wouter Compat Demo created by Cbbfcd...
Read more >Bug #1892438 “django 2 compatibility” - Launchpad Bugs
The django adminaudit module is currently not compatible with django 2, this will need to be ... Bug #1892438 reported by Wouter van...
Read more >AVR C Runtime Library - Bugs: bug #24887, boot.h not compatible ...
Wouter <wutje>. Thu 20 Nov 2008 07:41:53 AM UTC, original submission: The case where I am seeing this is in the definitions of...
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 FreeTop 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
Top GitHub Comments
i found this pr, I should dig deeper into the problem and now i probably understand the reason
Reopening this issue since #258 doesn’t completely fix the bugs - but fixes some of them.