Skip to content

minor editorial updates #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions beta/src/content/apis/react/createFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: createFactory

<Intro>

`createFactory` lets you create a function that creates React element of a given `type`. The `type` argument can be either a tag name string (such as `div` or `span`), a React component type (a class or a function), or a React fragment type.
`createFactory` lets you create a function that creates a React element of a given `type`. The `type` argument can be either a tag name string (such as `div` or `span`), a React component type (a class or a function), or a React fragment type.

You may typically invoke createFactory, if you are using [React without JSX].(https://beta.reactjs.org/learn/add-react-to-a-website#run-the-jsx-preprocessor)
`createFactory` is typically invoked if you are using [React without JSX.](https://beta.reactjs.org/learn/add-react-to-a-website#run-the-jsx-preprocessor)

```js
React.createFactory(type)
Expand Down Expand Up @@ -60,7 +60,7 @@ render(<App />, document.getElementById('root'));

### `createFactory(type)` {/*createFactory*/}

Call `createFactory(type)` to create a function that creates React element of a given `type`.
Call `createFactory(type)` to create a function that creates a React element of a given `type`.

```js
const myElement= React.createFactory(type)
Expand All @@ -73,4 +73,4 @@ const myElement= React.createFactory(type)

#### Returns {/*returns*/}

Returns a function that can be used to create React element of the given `type`.
Returns a function that can be used to create a React element of the given `type`.