question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use Vue event handlers in React?

See original GitHub issue

In Vue, we can use v-on:click directive, and in React it can be onClick. If I want to embed Vue components in React, how can I bind click event to them?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
akxcvcommented, May 16, 2018

I cloned your repo and messed around for a bit. It seems that JSX is not properly configured. I rewrote ReactButton to use plain React.createElement statements without any JSX and everything worked fine.

0reactions
tujoworkercommented, May 23, 2018

Thank You @akxcv ♥️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event Handling - Vue.js
A method handler automatically receives the native DOM Event object that triggers it - in the example above, we are able to access...
Read more >
Handling Events - React
React events are named using camelCase, rather than lowercase. With JSX you pass a function as the event handler, rather than a string....
Read more >
React vs Vue — Event Handling - Medium
In this article, we'll look at how we write event handling code with React and Vue and which one is more convenient.
Read more >
Deep dive into Vue event handling - LogRocket Blog
In this article, we'll cover the basics of handling events in Vue, and we'll learn how to apply event handling in a real-world...
Read more >
Handling Events with Vue.js
Handling events with Vue · Types of events you can handle · Event handling methods · Event object · Event modifiers · Custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found