Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Question re Fiber support #5

@AlexJeffcott

Description

@AlexJeffcott

Good morning and thanks for this exciting project!

Like many developers who want to use the best possible practices and stack for new React SPA projects. For me, this means Vite and friends and very possibly million.

HOWEVER, it also seems natural that I would want to use Suspense in my routes. I could imagine that it could look something like this:

import { StrictMode, Suspense, lazy } from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { ErrorBoundary, LazyLoadingFallbackUI } from './components';

const LandingPage = lazy(() => import('./pages/landingPage'));

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
	<StrictMode>
		<ErrorBoundary>
			<BrowserRouter>
				<Suspense fallback={<LazyLoadingFallbackUI />}>
					<Routes>
						<Route path="/" element={<LandingPage />} />
					</Routes>
				</Suspense>
			</BrowserRouter>
		</ErrorBoundary>
	</StrictMode>
);

It would put me off, reasobably or otherwise, and would likely act as a blocker to adoption at companies, reasonably or otherwise.

Can I know more about your thoughts on this? What is the thinking behind this choice? Is it perhaps on some roadmap? It is undesirable or simply irrelevant in some way?

While I think it could be the case that I am labouring under misunderstandings about the scope or even the purpose/functionality of million, I suspect that I would not be alone in this and would love to better understand.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions