Open in app

Sign In

Write

Sign In

Vitali Zaidman
Vitali Zaidman

2.7K Followers

Home

About

Published in Welldone Software

·Pinned

An Overview of JavaScript Testing in 2022

(Updated on: 21.11.2021) This guide is intended to catch you up with the most important reasoning, terms, tools, and approaches to JavaScript testing for the year 2022. It combines information from the best articles recently released (they are referenced at the bottom) and adds from my own experience. It’s a…

Programming

28 min read

An Overview of JavaScript Testing in 2020
An Overview of JavaScript Testing in 2020
Programming

28 min read


Published in Welldone Software

·May 3, 2021

Jest — How To Mock a Function Call Inside a Module

Mocking function calls within a module — Let’s say you have the file: // f.js export function b(){ return 'b'; } export function a(){ return b(); } If you want to mock b to test a, well… It is not as easy as it seems to be. The Naive Approach What I initially tried to do was: test('a', () =>…

Jest

3 min read

Jest — How To Mock a Function Call Inside a Module
Jest — How To Mock a Function Call Inside a Module
Jest

3 min read


Published in Welldone Software

·Jan 14, 2021

useCallback Might Be What You Meant By useRef & useEffect

Sometimes we respond to React element mounts. The first instinct is to useRef & useEffect. But It’s wrong. What you really need is often useCallback. — If you want to respond to a React element’s mounting on the DOM, you may be tempted to use useRef to get a reference to it and useEffect to respond to its mounts and unmounts. But it won’t work. This is because there is no callback or re-render when a…

React

3 min read

useCallback Might Be What You Meant By useRef & useEffect
useCallback Might Be What You Meant By useRef & useEffect
React

3 min read


Published in Welldone Software

·Nov 24, 2020

Two Ways to Run Tests on Different Versions of The Same Library F.E. React 17 + React 16

How can you run tests on version X and version Y of a library, with real-world examples of testing React 16 and React 17 — With the release of React 17, many React library maintainers found themselves wondering: “Should I test only React 17 from now on, or maybe should I stick to React 16 until version 17 will be more widely adopted by the community?”. I’ve certainly found myself in this situation with my…

React

4 min read

Two Ways to Run Tests on Different Versions of The Same Library F.E. React 17 + React 16
Two Ways to Run Tests on Different Versions of The Same Library F.E. React 17 + React 16
React

4 min read


Published in Welldone Software

·Oct 21, 2020

React — When Should Pure Components Be Used?

React.memo / React.PureComponent usage guide — What’s a Pure Component? (Official docs: React.PureComponent, React.memo) In the following example, when App re-renders, <Main userName={userName}/> and <Header/> are called: And they always return new React Elements. Remember that JSX is just syntax sugar for React.createElement (in React 17 it’s equivalent mostly conceptually) so App‘s code is equivalent to:

React

4 min read

React — When Should Pure Components Be Used?
React — When Should Pure Components Be Used?
React

4 min read


Published in Welldone Software

·May 25, 2020

React- useCallback Invalidates Too Often in Practice

What is issue #14099 in React’s repo and how it affects you? — Why do we need useCallback in the first place? In the official documentation of useCallback it says: “This is useful when passing callbacks to optimized child components that rely on reference equality to prevent unnecessary renders” In the following example, PureHeavyComponent would re-render every single time that the Parent component is re-rendered although PureHeavyComponent is pure because previous props.onClick…

React

3 min read

React- useCallback Invalidates Too Often in Practice
React- useCallback Invalidates Too Often in Practice
React

3 min read


Published in Welldone Software

·Mar 18, 2020

Forced to Work From Home? Maybe It’s a Blessing in Disguise?

When working remotely, you benefit much more from good working processes and proactive team members and you are punished much more severely for sloppy work processes and personal carelessness — When I heard about the possibility of working from home some 8 years ago at Welldone Software (recently merged with CodeValue), I had no idea what that meant. It even sounded pretty weird to me. How could my boss help me, and guide me? How will he know what I…

Remote Working

6 min read

Forced to Work From Home? Maybe it’s a Blessing in Disguise?
Forced to Work From Home? Maybe it’s a Blessing in Disguise?
Remote Working

6 min read


Published in Welldone Software

·Jan 27, 2020

Why Did You Render v4 Released!

TypeScript support, Custom hooks tracking (like React-Redux’s useSelector), Tracking of all pure components. — So what’s new in @welldone-software/why-did-you-render v4? TypeScript Support Typing for all the different scenarios of the library are now supported. Improved Overall Stability Tests are now covering more scenarios than ever, including integration with libraries, and there are no significant open issues.

React

2 min read

Why Did You Render v4 Released!
Why Did You Render v4 Released!
React

2 min read


Published in Welldone Software

·Nov 11, 2019

React Element’s “Parent” vs “Rendered By”

A key concept of React we tend to forget, quickly explained. — When I debug functionality and performance in a React app, I always keep in mind the difference between who created a certain element vs. it’s parent vs. the reason for it’s render. I would like to share my experience in this regard with you. Meet App, Parent, and Child. They…

React

2 min read

React Element’s “Parent” vs “Rendered By”
React Element’s “Parent” vs “Rendered By”
React

2 min read


Published in Welldone Software

·Oct 7, 2019

SEO For Developers — A Quick Overview

All you need to know about your role as a developer to improve your website’s position in Google search results. — The most important thing in getting a good rank in Google is to make your website engaging, useful, and original. Your role as a developer is to ensure it is accessible and smooth for users and correctly exposed to Google bots. Let’s talk about what it takes to appear on…

SEO

8 min read

SEO For Developers — A Quick Overview
SEO For Developers — A Quick Overview
SEO

8 min read

Vitali Zaidman

Vitali Zaidman

2.7K Followers

https://twitter.com/vzaidman ⎝(•ω•)⎠ https://vzaidman.com

Following
  • Tom Cooper

    Tom Cooper

  • Colton Swabb

    Colton Swabb

  • Gregory Sadler

    Gregory Sadler

  • Eric Elliott

    Eric Elliott

  • Guardio

    Guardio

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech