Skip to content

Commit d3ca60b

Browse files
authored
Update readme.md
1 parent 81a2a72 commit d3ca60b

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

readme.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,12 @@ const MyComp: Component<...> = props => {
4747
// You can rename props.
4848

4949
import { Component } from 'solid-js'
50-
const MyComp: Component<...> = (
51-
{ a: d, b: e, c: f } = defaultProps
52-
) => {d; e; f;}
50+
const MyComp: Component<...> = ({ a: d, b: e, c: f }) => {d; e; f;}
5351

5452
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
5553

5654
import { Component, mergeProps } from 'solid-js'
57-
const MyComp: Component<...> = props => {
58-
props.a; props.b; props.c;
59-
}
55+
const MyComp: Component<...> = props => {props.a; props.b; props.c;}
6056

6157

6258
// You can use rest element destructuring.

0 commit comments

Comments
 (0)