//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}
//app.js
import React, {useRef, useState} from 'react'
import logo from './logo.svg';
import './App.css';
function App() {
const [loc, setLoc] = useState([0,0])
const onMouseOver = (e) => {
console.log(e.nativeEvent)
setLoc([e.nativeEvent.offsetX, e.nativeEvent.offsetY])
}
return (
<div className='wrapper'>
<div
className='wrap'
onMouseMove={onMouseOver}
>
{loc[0]} {loc[1]}
</div>
</div>
);
}
export default App;
/*index.css*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.wrapper {
position: relative;
left: 20px;
top: 20px;
}
.wrap {
position: relative;
left:100px;
top:100px;
width: 1000px; height:500px; background-color:blue;
}