K

with-react-integration

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

Codemod Slate: withReact(createEditor()) to useMemo Transformation

This codemod transforms the usage of withReact(createEditor()) into a useMemo-based structure, which wraps the editor creation and introduces an inline-checking function (isInline) for the editor instance. This transformation optimizes the creation of the editor object by memoizing it.

Before (v0.88):

typescript

After (v0.104):

typescript

Ready to contribute?

Build your own codemod and share it with the community.