Skip to content

Commit 76f2a1d

Browse files
committed
Fixed custom component
1 parent 2fab9b0 commit 76f2a1d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/08-advanced-patterns/70-as-prop-with-custom-components.problem.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@ const Example1 = () => {
4545
* Should work with Custom components!
4646
*/
4747

48-
const Custom = (
49-
props: { thisIsRequired: boolean },
50-
ref: React.ForwardedRef<HTMLAnchorElement>,
51-
) => {
52-
return <a ref={ref} />;
48+
const Custom = (props: { thisIsRequired: boolean }) => {
49+
return <a />;
5350
};
5451

5552
const Example2 = () => {

src/08-advanced-patterns/70-as-prop-with-custom-components.solution.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ const Example1 = () => {
4040
* Should work with Custom components!
4141
*/
4242

43-
const Custom = (
44-
props: { thisIsRequired: boolean },
45-
ref: React.ForwardedRef<HTMLAnchorElement>,
46-
) => {
47-
return <a ref={ref} />;
43+
const Custom = (props: { thisIsRequired: boolean }) => {
44+
return <a />;
4845
};
4946

5047
const Example2 = () => {

0 commit comments

Comments
 (0)