bitovi / bitovi/react-to-web-component

The function prop is not working with react

Open
#225 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
944
Forks
52
PR merge metrics
No merged PRs in 30d

Description

I got the error '..is not a function' when working with react 19
`const ChatWidget = r2wc(ChatComponent, {
props: {
selectedTopic: 'string',
streamingApi: 'string',
chatApi: 'string',
dowloadReferenceApi: 'string',
accessToken: 'string',
onCustomClick:'function'
},
});`

=>onCustomClick is not a function

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the r2wc(ChatComponent, { props: { onCustomClick: 'function' } }) example with React 19 and trace how the function prop is passed to ChatComponent. Done means onCustomClick is callable from the React component instead of producing an “is not a function” error.

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
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.