Is it ok to ask questions such at this in this thread...?
Trying to learn React and I've tried every combination of thing I can think of and looked up a bunch of Stack Overflow answers, but to no avail and I'd like to understand this more than just make it work.
Code:
import React, { Component } from 'react';
import Layout from "./Components/Layout"
import './App.css';
class App extends Component {
mouseOut() {
console.log("Mouse out!!!");
}
mouseOver() {
console.log("Mouse over!!!");
}
render() {
return (
<div>
<img src="./picture.jpg" onMouseOut={ () => this.mouseOut()} onMouseOver={ () => this.mouseOver()} height="100" width="100" />
<Layout />
</div>
);
}
}
export default App;
The mouseOut and mouseOver functions get called when you click on and then off of the image, but don't happen when hovering over and leaving.
??