Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TanStack Router + runtime Module Federation reproduction

Minimal reproduction for an Invalid hook call that occurs when a runtime-loaded Vite remote uses @tanstack/router-plugin@1.168.17 and the host has created a separate TanStack Router instance in the same browser window.

Versions

  • React 18.3.1
  • Vite 7.3.1
  • @tanstack/react-router 1.168.17
  • failing @tanstack/router-plugin 1.168.17
  • working control version 1.168.16
  • @module-federation/vite 1.19.1

Reproduce

Requirements: Node.js 20.19+ and npm.

npm install
npm run repro

Open:

http://localhost:4173

Then click Load and mount remote.

The command intentionally runs the applications in different modes:

host:   production build + vite preview on http://localhost:4173
remote: vite dev server on http://localhost:5174

Expected failing result with @tanstack/router-plugin@1.168.17:

Invalid hook call. Hooks can only be called inside of the body of a function component.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages