Browse Source

fix typo

main
Dan Abramov 2 years ago
parent
commit
88a2e53024
  1. 2
      beta/src/content/apis/react/createFactory.md

2
beta/src/content/apis/react/createFactory.md

@ -190,7 +190,7 @@ function Heading({ isSubheading, ...props }) {
To do the same in JSX, you need to rename your variable to start with an uppercase letter like `Type`:
```js {2,3}
function Heading({ size, ...props }) {
function Heading({ isSubheading, ...props }) {
let Type = isSubheading ? 'h2' : 'h1';
return <Type {...props} />;
}

Loading…
Cancel
Save