Skip to content

Instantly share code, notes, and snippets.

@vibecode
vibecode / reactIsAFramework.md
Created Apr 8, 2021 — forked from peerreynders/reactIsAFramework.md
React is a (view component) framework
View reactIsAFramework.md

"Art prior" to React:

Martin Fowler: InversionOfControl (2005-Jun-26)

Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

The litmus test:

  • If your code calls it, it's a library.
@vibecode
vibecode / main.css
Created Aug 22, 2016 — forked from kovaldn/main.css
CSS: footer
View main.css
<div class="wrapper">
<div class="main-content">
</div>
</div>
<footer class="page-footer">
</footer>
/* прибьём футер к низу*/
.wrapper{
@vibecode
vibecode / 0_reuse_code.js
Created Jun 28, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console