Sign in

kob003
image By: OpenClipart-Vectors/27403

Event-methods:

  • onmouseenter,
  • onmouseleave,
  • onmouseover,
  • onmouseout,
  • mousemove

pic: Designed by user2104819 / Freepik

Properties to be discussed:

ScrollY & pageYOffset:


A simple example to understand how to mock a module in jest

we will be using ‘uuid’ module for our example;

import {v4 as uuidv4} from "uuid";const setId = () => (dispatch) => {                          
const id = uuidv4();
dispatch({
type:'SET_ID',
id
});
};

installing the necessities:

package.json file:

"scripts":{
“build” : “webpack watch”,
“dev-server”: “webpack serve --open”
}

folder structure:

> --dist/
> ----index.html
> --src/
> ----index.js
> ----style.css

kob003

an apprentice

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store