Skip to content

Instantly share code, notes, and snippets.

Ville Immonen fson

Block or report user

Report or block fson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:0c6c21f38d7af09ee76485cb1a788fa4
Verifying my Blockstack ID is secured with the address 1FborCiWomnCbAfgVb5sdvUB3tM5jdpWJk
fson /
Last active May 23, 2017
CSS in JS wish list
  1. Style elements inline in JSX via the style prop, without any wrapping. No (mandatory) "presentational components" or StyleSheet.
  • style prop allows for compatibility with react-primitives, React Native components and many 3rd party components. The Primitives (View, Text, Image...) are designed to work cross-platform (web, Android, iOS...) and they provide convenient defaults for Flexbox based layout.
  • I want to add these elements in JSX, style them inline and only name and extract them to separate component when it becomes necessary, not upfront. Extracting to a named component can be as simple as adding const Wrapper = () => before the JSX element. No new syntax for creating a component.
  1. Support vendor prefixes, pseudo classes, media queries, CSS variables...
  • Support things like @media (-webkit-min-device-pixel-ratio: 2), :hover, or `var(--panel-back
fson / paluu.js
Last active Apr 3, 2017
Paluu.js – Redux
View paluu.js
tuo onPelkistettyOlio paikasta 'ala-ajatusviiva/onPelkistettyOlio'
tuo $$havaittava paikasta 'merkki-havaittava'
vie vakio TekoTyypit = {
ALUSTA: '@@redux/ALUSTA'
vie oletus funktio luoVarasto(vähentäjä, esikuormitettuTila, tehostaja) {
jos (
sentyyppi esikuormitettuTila === 'funktio' &&
fson / promiseErrorHandling.js
Last active Sep 18, 2016
Promise error handling with the Either pattern (disjunction)
View promiseErrorHandling.js
import { Failure, Success } from 'data.validation';
// Report unhandled promise rejections (bugs)
window.onunhandledrejection = (event) => {
// Raven.captureException(event.reason);
console.error('Unhandled rejection:', event.reason);
function fetchRepo(name) {
return fetch(`${name}`).then((response) =>
fson /
Created Aug 27, 2016
react-modal and Jest snapshot testing
fson / .babelrc
Created Jun 22, 2016
A todo app example with frzr and JSX.
View .babelrc
"plugins": [
["transform-react-jsx", { "pragma": "frzr.el" }]
"presets": ["es2015"]
fson / ReindexSchema.json5
Last active Jul 13, 2016
Reindex shopping cart schema with permissions
View ReindexSchema.json5
name: 'Shop',
kind: 'OBJECT',
interfaces: ['Node'],
fields: [
{ name: 'id', type: 'ID', nonNull: true, unique: true },
{ name: 'owner', type: 'User', reverseName: 'ownShops' },
{ name: 'staff', type: 'Connection', ofType: 'User',
reverseName: 'staffShops' },
fson / example.js
Created Mar 17, 2016
Recursive GraphQL demo
View example.js
import { inspect } from 'util';
import {
fson / ReindexSchema.json
Created Oct 29, 2015
Import data from the Movie Database into Reindex
View ReindexSchema.json
"name": "TvSeason",
"kind": "OBJECT",
"interfaces": [
"fields": [
"name": "air_date",
fson /
Created Oct 18, 2015
Rapid prototyping with Relay (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐️ the Gist - the amount of stars decides whether it makes the cut!

Rapid prototyping with Relay

Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.

You can’t perform that action at this time.