Skip to content

Instantly share code, notes, and snippets.

View runewizard's full-sized avatar

Taras Zubchevskyi runewizard

View GitHub Profile
@runewizard
runewizard / rules.md
Created May 9, 2018 19:36 — forked from nicolas-briemant/rules.md
how to structure a redux application

how to structure a redux application

A well-thought structure is helpful for the maintainability of the code.
It also helps to avoid some common anti-patterns.
A redux application is not necessary a big thing, it can also be a component that is complex enough to require redux.

There are the only 2 rules to comply with, so it is not painful to always have them in mind while developing.

use a modular organisation

test spotify

The goal of the test is to access your React/Redux skills.
The duration of the test is limited to 4h.
The source code must be provided through a git repository link.

Do not lose time on the environment aspect.
You are free to use your favorite boilerplate (as soon as it relies on webpack), give a try to create-react-app or use jsbin.

@runewizard
runewizard / links.md
Created May 2, 2018 09:05 — forked from una/links.md
a-css-carol--links
@runewizard
runewizard / what-forces-layout.md
Created May 9, 2017 14:52 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@runewizard
runewizard / destructuring.js
Created May 9, 2017 14:22 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'