Skip to content

Commit 36ad22a

Browse files
committed
Added comment to 73
1 parent d680265 commit 36ad22a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/08-advanced-patterns/68-hoc.solution.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Router, useRouter } from "fake-external-lib";
22

33
export const withRouter = <TProps extends { router: Router }>(
4-
Component: React.ComponentType<TProps>,
4+
Component: React.FC<TProps>,
55
) => {
66
const NewComponent = (props: Omit<TProps, "router">) => {
77
const router = useRouter();

src/08-advanced-patterns/73-as-prop-with-forward-ref.problem.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import {
66
} from "react";
77
import { Equal, Expect } from "../helpers/type-utils";
88

9+
/**
10+
* FYI - this solution took me the best part of a whole day to find,
11+
* and the help of several TS experts in the community.
12+
*
13+
* So, don't feel bad if you don't find it at all.
14+
*/
15+
916
export const UnwrappedLink = <T extends ElementType>(
1017
props: {
1118
as?: T;

0 commit comments

Comments
 (0)