Skip to content
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

Bump @tiptap/react from 2.4.0 to 2.5.0 in /client #113

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 15, 2024

Bumps @tiptap/react from 2.4.0 to 2.5.0.

Release notes

Sourced from @​tiptap/react's releases.

@​tiptap/react@​2.5.0

Patch Changes

  • fb45149: Fixes strict mode accidentally destroying the editor instance

  • fb45149: Fix the typings

  • fb45149: We've heard a number of complaints around the performance of our React integration, and we finally have a solution that we believe will satisfy everyone. We've made a number of optimizations to how the editor is rendered, as well give you more control over the rendering process.

    Here is a summary of the changes and how you can take advantage of them:

    • SSR rendering was holding back our ability to have an editor instance on first render of useEditor. We've now made the default behavior to render the editor immediately on the client. This behavior can be controlled with the new immediatelyRender option which when set to false will defer rendering until the second render (via a useEffect), this should only be used when server-side rendering.
    • The default behavior of the useEditor hook is to re-render the editor on every editor transaction. Now with the shouldRerenderOnTransaction option, you can disable this behavior to optimize performance. Instead, to access the new editor state, you can use the useEditorState hook.
    • useEditorState this new hook allows you to select from the editor instance any state you need to render your UI. This is useful when you want to optimize performance by only re-rendering the parts of your UI that need to be updated.

    Here is a usage example:

    const editor = useEditor({
      /**
       * This option gives us the control to enable the default behavior of rendering the editor immediately.
       */
      immediatelyRender: true,
      /**
       * This option gives us the control to disable the default behavior of re-rendering the editor on every transaction.
       */
      shouldRerenderOnTransaction: false,
      extensions: [StarterKit],
      content: `
        <p>
          A highly optimized editor that only re-renders when it’s necessary.
        </p>
        `,
    });
    /**
    
    This hook allows us to select the editor state we want to use in our component.
    /
    const currentEditorState = useEditorState({
    /*
    
    The editor instance we want to use.
    /
    editor,
    /*
    This selector allows us to select the data we want to use in our component.
    It is evaluated on every editor transaction and compared to it's previously returned value.
    You can return any data shape you want.
    */
    selector: (ctx) => ({
    isBold: ctx.editor.isActive("bold"),

... (truncated)

Changelog

Sourced from @​tiptap/react's changelog.

2.5.0

Patch Changes

  • fb45149: Fixes strict mode accidentally destroying the editor instance

  • fb45149: Fix the typings

  • fb45149: We've heard a number of complaints around the performance of our React integration, and we finally have a solution that we believe will satisfy everyone. We've made a number of optimizations to how the editor is rendered, as well give you more control over the rendering process.

    Here is a summary of the changes and how you can take advantage of them:

    • SSR rendering was holding back our ability to have an editor instance on first render of useEditor. We've now made the default behavior to render the editor immediately on the client. This behavior can be controlled with the new immediatelyRender option which when set to false will defer rendering until the second render (via a useEffect), this should only be used when server-side rendering.
    • The default behavior of the useEditor hook is to re-render the editor on every editor transaction. Now with the shouldRerenderOnTransaction option, you can disable this behavior to optimize performance. Instead, to access the new editor state, you can use the useEditorState hook.
    • useEditorState this new hook allows you to select from the editor instance any state you need to render your UI. This is useful when you want to optimize performance by only re-rendering the parts of your UI that need to be updated.

    Here is a usage example:

    const editor = useEditor({
      /**
       * This option gives us the control to enable the default behavior of rendering the editor immediately.
       */
      immediatelyRender: true,
      /**
       * This option gives us the control to disable the default behavior of re-rendering the editor on every transaction.
       */
      shouldRerenderOnTransaction: false,
      extensions: [StarterKit],
      content: `
        <p>
          A highly optimized editor that only re-renders when it’s necessary.
        </p>
        `,
    });
    /**
    
    This hook allows us to select the editor state we want to use in our component.
    /
    const currentEditorState = useEditorState({
    /*
    
    The editor instance we want to use.
    /
    editor,
    /*
    This selector allows us to select the data we want to use in our component.
    It is evaluated on every editor transaction and compared to it's previously returned value.
    You can return any data shape you want.
    */
    selector: (ctx) => ({
    isBold: ctx.editor.isActive("bold"),
    isItalic: ctx.editor.isActive("italic"),

... (truncated)

Commits
  • 9b566b9 chore: release version 2.5
  • fb45149 revert: "chore(release): publish a new pre-release version"
  • ff15704 chore(release): publish a new pre-release version
  • c15f89b chore(release): publish a new pre-release version (pre)
  • 1110280 fix(react): useEditor should not destroy still mounted instances (#5338)
  • db0d007 Publish a new pre-release version (pre) (#5328)
  • e902c12 refactor(react): flip order of useEditorState overloads
  • 91d8f58 Publish a new pre-release version (pre) (#5322)
  • df5609c fix: default to rendering the editor immediately, while staying backward comp...
  • 5c2f67f chore(release): publish a new pre-release version (pre)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by nperez0111, a new releaser for @​tiptap/react since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@tiptap/react](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/react) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/react/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/@tiptap/[email protected]/packages/react)

---
updated-dependencies:
- dependency-name: "@tiptap/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 15, 2024
@dependabot dependabot bot requested a review from airelawaleria July 15, 2024 02:06
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 25, 2024

Superseded by #139.

@dependabot dependabot bot closed this Jul 25, 2024
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/client/tiptap/react-2.5.0 branch July 25, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant