Uncaught Error

Open
#61 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the error in the MarkdownTextarea/Default Storybook story using the wrapper and state shown in the report. Start by checking the MarkdownEditor value and onChange props and the reported hot-update stack; done means the story renders without the repeating uncaught TypeError.

Written by the indexing model from the issue text.

Description

I am currently wrapping for use in an internal project

The wrapper is very simple (in its early stages) and shown below

const MarkdownTextarea: FunctionComponent<MarkdownTextareaProps> = ({ invalid, ...props }) => {
    const classes = useStyles();

    return (
        <MarkdownEditor height={400} visible={true} {...props} />
    );
};

We are testing this wrapper using

    const [value, setValue] = useState<string>("# This is a textarea")
    return (<MarkdownTextarea value={value} onChange={action('onChange')} />)

When validating in story book I see the following error which seems to repeat every 500ms.

MarkdownTextarea/Default/error: (5) ["Uncaught TypeError: Cannot read property 'apply' of undefined", "http://localhost:9090/vendors~main.1a2cfcd6df914474ab0d.hot-update.js", 5350, 61, TypeError]
0: "Uncaught TypeError: Cannot read property 'apply' of undefined"
1: "http://localhost:9090/vendors~main.1a2cfcd6df914474ab0d.hot-update.js"
2: 5350
3: 61
4: TypeError

Any guidance and advice in helping to troubleshoot this would be appreciated

Dominant language
TypeScript
Stars
382
Forks
37
PR merge metrics
No merged PRs in 30d

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.

More from uiwjs/react-markdown-editor

All issues in uiwjs/react-markdown-editor

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.