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

v3: link with as child pattern #378

Merged
merged 18 commits into from
Nov 15, 2023
Merged

v3: link with as child pattern #378

merged 18 commits into from
Nov 15, 2023

Conversation

jeetiss
Copy link
Collaborator

@jeetiss jeetiss commented Nov 5, 2023

<Link asChild /> feature

usage

// right

<Link to='href' ref={ref}>
  link
</Link>

<Link to='href' ref={ref} className={'hello'}>
  link
</Link>

<Link to='href' asChild>
  <Button>hello world</Button>
</Link>

<Link to='href' asChild>
  <Button ref={ref}>hello world</Button>
</Link>

// wrong

<Link to='href' asChild ref={ref} className={'noo'}>
  <Button ref={ref}>hello world</Button>
</Link>

<Link to='href' asChild>
  text
</Link>

Copy link

codesandbox bot commented Nov 5, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

stackblitz bot commented Nov 5, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@jeetiss jeetiss changed the base branch from main to v3 November 5, 2023 11:39
Copy link

github-actions bot commented Nov 9, 2023

size-limit report 📦

Path Size
packages/wouter/esm/index.js 2.08 KB (+1.1% 🔺)
packages/wouter/esm/use-browser-location.js 658 B (0%)
packages/wouter/esm/memory-location.js 836 B (0%)
packages/wouter/esm/use-hash-location.js 734 B (0%)
packages/wouter-preact/esm/index.js 1.97 KB (+1.11% 🔺)
packages/wouter-preact/esm/use-browser-location.js 553 B (0%)
packages/wouter-preact/esm/use-hash-location.js 609 B (0%)
packages/wouter-preact/esm/memory-location.js 703 B (0%)

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cb714ce) 0.00% compared to head (e5e9e04) 100.00%.
Report is 1 commits behind head on v3.

Additional details and impacted files
@@            Coverage Diff            @@
##           v3      #378        +/-   ##
=========================================
+ Coverage    0   100.00%   +100.00%     
=========================================
  Files       0         1         +1     
  Lines       0         1         +1     
=========================================
+ Hits        0         1         +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeetiss jeetiss self-assigned this Nov 11, 2023
@jeetiss jeetiss requested a review from molefrog November 11, 2023 14:05
@jeetiss jeetiss marked this pull request as ready for review November 11, 2023 14:05
packages/wouter/src/index.js Outdated Show resolved Hide resolved
packages/wouter/test/link.test.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Show resolved Hide resolved
packages/wouter/test/link.test-d.tsx Show resolved Hide resolved
packages/wouter/test/link.test.tsx Outdated Show resolved Hide resolved
packages/wouter/test/link.test.tsx Outdated Show resolved Hide resolved
packages/wouter/types/index.d.ts Outdated Show resolved Hide resolved
Copy link
Owner

@molefrog molefrog left a comment

Choose a reason for hiding this comment

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

👍

@molefrog molefrog merged commit 6a0da2d into v3 Nov 15, 2023
@molefrog molefrog deleted the link-with-as-child-pattern branch November 15, 2023 10:58
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.

2 participants