Skip to content

Instantly share code, notes, and snippets.

View pleunv's full-sized avatar
:shipit:

Pleun Vanderbauwhede pleunv

:shipit:
View GitHub Profile
@pleunv
pleunv / babel-preset-react-app.js
Last active February 24, 2020 12:34
webpack 4 dev config
/* eslint-disable import/no-extraneous-dependencies, prefer-template */
// const validateBoolOption = (name, value, defaultValue) => {
// if (typeof value === 'undefined') {
// value = defaultValue;
// }
// if (typeof value !== 'boolean') {
// throw new Error(`Preset react-app: '${name}' option must be a boolean.`);
// }
@pleunv
pleunv / UserForm.js
Last active October 24, 2017 16:03 — forked from atuttle/UserForm.js
import { gql, graphql } from 'react-apollo';
import { Formik } from 'formik';
const validate = values => {
return {}; //simplified for now
};
const getInitialValues = user => ({
firstName: user && user.firstName || '',
lastName: user && user.lastName || '',
@pleunv
pleunv / npm_upgrade_on_windows.md
Last active August 29, 2015 14:26
Upgrading NodeJS & NPM on Windows

Upgrade NodeJS on Windows

  • Uninstall the current version via Programs and Features.
  • Download the latest version from the NodeJS website. (32-bit version is prefered, 64-bit should also work but I haven't tried this one recently)
  • Install. This contains a bundled version of NPM which will have to be manually updated afterwards.

Upgrade NPM on Windows

  • Install the npm-windows-upgrade package globally: npm install -g npm-windows-upgrade.
  • The first time you do this you might have to enable scripting on your system:
  • Open up a Powershell commandline in Administrator mode

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).