Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin solid-router and router-core #3086

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Brendonovich
Copy link

I've copied react-router into solid-router and replaced most of the React APIs with their Solid equivalent, and also extracted a lot of code that doesn't rely on Solid to router-core, which we can later use in react-router.
solid-router still has a lot of issues (and seems to be running into solidjs/solid#2352), but a high number of tests are already passing.

@Brendonovich Brendonovich marked this pull request as ready for review January 12, 2025 08:14
Copy link

nx-cloud bot commented Jan 12, 2025

View your CI Pipeline Execution ↗ for commit d6d2104.

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ❌ Failed 5m 27s View ↗
nx run-many --target=build --exclude=examples/*... ❌ Failed 1m 17s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-12 17:34:57 UTC

@MengLinMaker
Copy link

The render function from @solidjs/testing-library does not update the router state, nor render the route related html elements.
This causes many unit tests to fail.

LazyRouteOptions,
} from './fileRoute'

export * from '@tanstack/router-core'
Copy link

@birkskyum birkskyum Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is great export * from '@tanstack/router-core'. I assume it's a result of moving the ./history.ts file over, and replacing the export * from './history', but the @tanstack/router-core contain a lot more.

>
: TAcc

export type ParentPath<TOption> = 'always' extends TOption

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions can't be extracted this easily - they depend on the AnyRouter now:

export type ParentPath<TRouter extends AnyRouter> =
TrailingSlashOptionByRouter<TRouter> extends 'always'
? '../'
: TrailingSlashOptionByRouter<TRouter> extends 'never'
? '..'
: '../' | '..'
export type CurrentPath<TRouter extends AnyRouter> =
TrailingSlashOptionByRouter<TRouter> extends 'always'
? './'
: TrailingSlashOptionByRouter<TRouter> extends 'never'
? '.'
: './' | '.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants