Frontend Scrapbook

Notes that make a difference

category: ReactJS

Testing ReactJS Applications

By admin on Mon Sep 14 2020

In tests, we Arrange, Act, and Assert! Configuring Jest in react applications By default Jest actually loads JSDOM. ( so, we have access to window object in tests ) – We can add configuration for Jest if we don’t require JSDOM ( access to the window ). This can be done by adding ‘jest-environment-node’ / […]

Access Redux store external to react ecosystem

By admin on Tue Jun 09 2020

I recently happen to see a code written by an experienced developer. global is like ‘window’, but in NodeJS env. By default, all the variables, functions declared has local scope in a Node module. If you consider all the files are imported within a container namespace, global points to exactly the same, where you can […]