Skip to content

Commit

Permalink
Fix: change children prop on navlink props to be optional (#8725)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Dorr <[email protected]>
Co-authored-by: Ryan Mann <[email protected]>
  • Loading branch information
3 people committed Mar 20, 2022
1 parent 1100224 commit 423c8dc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ body:
you ask a question, here are some resources to get help first:
- Read the docs: https://reactrouter.com
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/v6/getting-started/faq
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/v6/faq
- Explore examples: https://reactrouter.com/docs/en/v6/examples/basic
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/ask?tags=react-router
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
- Ask in chat: https://discord.gg/6RyV8n8yyM
### Test Case Starter:
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ body:
you ask a question, here are some resources to get help first:
- Read the docs: https://reactrouter.com
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/v6/getting-started/faq
- Explore examples: hhttps://reactrouter.com/docs/en/v6/examples/basic
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/ask?tags=react-router
- Check out the list of frequently asked questions: https://reactrouter.com/docs/en/v6/faq
- Explore examples: https://reactrouter.com/docs/en/v6/examples/basic
- Look for/ask questions on Stack Overflow: https://stackoverflow.com/questions/tagged/react-router
- Ask in chat: https://discord.gg/6RyV8n8yyM
- type: textarea
attributes:
Expand Down
6 changes: 5 additions & 1 deletion contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@
- IbraRouisDev
- Isammoc
- JakubDrozd
- janpaepke
- jmargeta
- jonkoops
- kantuni
- kddnewton
- kentcdodds
- kkirsche
- koojaa
- KutnerUri
- latin-1
- liuhanqu
- lukerSpringTree
- markivancho
- mcansh
- mfijas
- noisypigeon
- paulsmithkc
- petersendidit
Expand All @@ -40,8 +43,9 @@
- shihanng
- shivamsinghchahar
- thisiskartik
- ThornWu
- timdorr
- turansky
- underager
- vijaypushkin
- KutnerUri
- rtmann
4 changes: 2 additions & 2 deletions docs/getting-started/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ That's where a React Router specific `history` object comes into play. It provid

```js
let history = createBrowserHistory();
history.listen((location, action) => {
history.listen(({ location, action }) => {
// this is called whenever new locations come in
// the action is POP, PUSH, or REPLACE
});
Expand Down Expand Up @@ -668,7 +668,7 @@ The `PageLayout` route is admittedly weird. We call it a [layout route](#layout-

```jsx bad lines=[14-16,22-24]
<Routes>
<Routes path="/" element={<App />}>
<Route path="/" element={<App />}>
<Route index element={<Home />} />
<Route path="teams" element={<Teams />}>
<Route path=":teamId" element={<Team />} />
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default function Invoices() {

Finally, let's teach React Router how to render our app at different URLs by creating our first "Route Config" inside of `main.jsx` or `index.js`.

```tsx lines=[2,4-5,13-19] filename=src/main.jsx
```tsx lines=[2,4-5,8-9,13-19] filename=src/main.jsx
import { render } from "react-dom";
import {
BrowserRouter,
Expand Down Expand Up @@ -806,7 +806,7 @@ export function deleteInvoice(number) {
Now let's add the delete button, call our new function, and navigate to the index route:

```js lines=[1-2,5-6,17-26] filename=src/routes/invoice.jsx
```js lines=[1-6,20-29] filename=src/routes/invoice.jsx
import {
useParams,
useNavigate,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ if (__DEV__) {

export interface NavLinkProps
extends Omit<LinkProps, "className" | "style" | "children"> {
children:
children?:
| React.ReactNode
| ((props: { isActive: boolean }) => React.ReactNode);
caseSensitive?: boolean;
Expand Down

0 comments on commit 423c8dc

Please sign in to comment.