React In Vue (converted to jsx) button event not firing
This isn't so much a bug or anything... I'm assuming it's something I setup wrong etc... just curious if anyone had any clue as to what.
I changed the Button.js to Button.jsx and updated the contents to this:
function Button() {
const buttonCLick = ()=>{
console.log("Button Clicked!");
}
return (
<button onClick={buttonCLick}>React Button</button>
);
}
export default Button;
I updated the webpack configs so that this is actually rendered in the home project, and watching debug console, you can see the events fire when button is clicked.
Refreshing the layout site (port 3001) it renders the button just fine, but the button wiring simply doesnt work.
I suspect it something about how the component seems to be loaded from url, rendered to a string, and set to a variable... and then populated in the vue.
Is there a way I can wire up the components to have some basic functionality, and expect the vue host to be able to trigger those events?
Not sure. It should work