Skip to content

Instantly share code, notes, and snippets.

View rpunkfu's full-sized avatar

Oskar Cieslik rpunkfu

View GitHub Profile
@rpunkfu
rpunkfu / prototypal-inheritance.js
Created January 5, 2017 15:45
Just a quick example
const Dog = {
woof () { return `Woof! I am ${this.name}!` }
}
const Yoko = Object.assign(Object.create(Dog), { name: 'Yoko' })
const Yoshi = Object.assign(Object.create(Dog), { name: 'Yoshi' })
Yoko.woof() // Returns 'Woof! I am Yoko!'
Yoshi.woof() // Returns 'Woof! I am Yoshi!'
$ rake tmp:clear
import React from 'react';
import { imagePath } from 'rwr-view-helpers';
import { facebookIcon } from 'constants/icon-urls';
export default ({ alt }) => (
<img alt={alt} src={imagePath(facebookIcon)} />
);
//=require rwr_view_helpers`
$ gem 'rwr-view_helpers'
$ npm install --save rwr-view-helpers

Table of Contents

  1. How does it work?
  2. How to install it?
  3. How to use it?
  4. Contributing
  5. Future updates

———————————————————————————————————————————————————————

Painless Rails & React integration using React-Webpack-Rails.

Here at Netguru we love working with both Rails & React and lately we find ourselves using putting those in our stack more & more, but often we found it hard to integrate them in easy and elegant manner, that’s why we came up with RWR which solved them immediately. In following article I will show you how we use it at our company and how easy it is for you to star integrating it in your own projects.

———————————————————————————————————————————————————————

Table of Contents

  1. What is React_Webpack_Rails:
    • How does it work?
    • How does it help us?
let foo = { n: 1 };
let bar = foo;
foo.x = foo = {n: 2};
add(2, 5); // 7
add(2)(5); // 7