uiwjs / uiwjs/react-md-editor

Cannot access current state from execute callback

Open
#251 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
201
Avg merge
12m
Merged PRs (30d)
1

Description

I'm trying to create a custom ICommand that needs to access a state property.

When execute is called the state he's reading is not updated, is what it were when MDEditor component was rendered.

check this example on code sandbox example.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the linked CodeSandbox example and trace how the custom ICommand execute callback obtains state from the MDEditor component. Confirm the current and stale values during execution, then verify that the callback can read the latest state consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.