Skip to content

Conversation

@dbudwin
Copy link
Owner

@dbudwin dbudwin commented Dec 25, 2020

It's not possible to create a prop named key without getting errors, and I didn't want to pass arbitrary props into the component, so I named the propuniqueKey.

This also vastly simplifies how common props can be passed into SecureLink by extending the React.HTMLAttributes<HTMLAnchorElement> interface which has the props (in addition to many others), that I was manually defining (className and style).

It's not possible to create a prop named `key` without getting errors, and I didn't want to pass arbitrary props into the component, so I named the prop`uniqueKey`.

This also vastly simplifies how common props can be passed into `SecureLink` by extending the `React.HTMLAttributes<HTMLAnchorElement>` interface which has the props (in addition to many others), that I was manually defining (`className` and `style`).
@dbudwin dbudwin added the enhancement New feature or request label Dec 25, 2020
@github-actions
Copy link

Coverage after merging AddKey into main

100.00%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.tsx100%100%100%
src/components
   index.tsx100%100%100%
   secure-link.tsx100%100%100%

@github-actions

This comment has been minimized.

@dbudwin dbudwin merged commit c76e783 into main Dec 25, 2020
@dbudwin dbudwin deleted the AddKey branch December 25, 2020 17:55
@github-actions
Copy link

Unit Test Results

  1 files  ±    0    1 suites  ±0   2s ⏱️ -2s
80 tests  - 240  80 ✔️  - 240  0 💤 ±0  0 ❌ ±0 

Results for commit c76e783. ± Comparison against base commit fd99308.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants