slate icon indicating copy to clipboard operation
slate copied to clipboard

fix: docs page - installing slate

Open BarrBozzO opened this issue 2 years ago • 1 comments

Description Documentation page(Installing slate) fix: proper use of useState for an editor initialization.

A clear and concise description of what this pull request solves. (Please do not just link to a long issue thread. Instead include a clear description here or your pull request will likely not be reviewed as quickly.)

Issue Incorrect\Before:

const editor = useState(() => withReact(createEditor())) 

Correct\After:

const [editor] = useState(() => withReact(createEditor())) 

Example

Context

Checks

  • [ ] The new code matches the existing patterns and styles.
  • [ ] The tests pass with yarn test.
  • [ ] The linter passes with yarn lint. (Fix errors with yarn fix.)
  • [ ] The relevant examples still work. (Run examples with yarn start.)
  • [ ] You've added a changeset if changing functionality. (Add one with yarn changeset add.)

BarrBozzO avatar Jun 21 '22 16:06 BarrBozzO

⚠️ No Changeset found

Latest commit: 13f6a7ec77b97b6caa6669fe060e275194ddf5b4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 21 '22 16:06 changeset-bot[bot]

Closing in favor of #5097 which has the same fix but actually filled in the issue template.

dylans avatar Aug 22 '22 23:08 dylans