Skip to content

Instantly share code, notes, and snippets.

View kenwheeler's full-sized avatar
🌭
PRs Welcome

Ken Wheeler kenwheeler

🌭
PRs Welcome
View GitHub Profile
// thunk
export function save(filename, notebook) {
return (subject) => {
// If there isn't a filename, save-as it instead
if (!filename) {
throw new Error('save needs a filename');
}
subject.next({
type: constants.START_SAVING,

###SLIDE 0 Hi, my name is Ken Wheeler, I work at Formidable and I’m here to talk about building the Walmart IOS pharmacy in React. Before I get down to brass tacks, I’d like to speak briefly about how we got to this point.

###SLIDE 1 Walmart loves React. We have React in production right now, and we are in the middle of switching most tracks on Walmart.com to React. It has been working great for us.

###SLIDE 2 We developed an internal platform called Electrode, where we have all of the UI components on Walmart.com built as React components. Previously, we had seen developers building the same UI components over and over again, and React has given us the opportunity to only build these components once and reuse them all over the place.

So I was asked if I wanted to take a crack at converting a portion of the mobile application to React Native, and I was like what are you kidding me, of course I do. Me and a small team spent the next few months building the Pharmacy in react native and it has been downright

@kenwheeler
kenwheeler / esnextbin.md
Created February 12, 2016 14:30
esnextbin sketch
@kenwheeler
kenwheeler / esnextbin.md
Created February 10, 2016 00:35
esnextbin sketch
import React from "react";
import { shallow } from "enzyme";
import OurComponent from "../our-component";
describe("<OurComponent/>", () => {
it("should render children when supplied the items prop", () => {
let mockData = [
{ name: "test" },
import React from "react";
import { shallow } from "enzyme";
import OurComponent from "../our-component";
describe("<OurComponent/>", () => {
// insert assertions here
});
import React from "react-native";
const {
View,
Text
} = React;
class OurComponent extends React.Component {
render() {
<View>
"use strict";
var chai = require("chai");
global.expect = chai.expect;
--compilers js:test/compile.js
--require test/setup.js
var fs = require('fs');
var path = require('path');
var babel = require('babel-core');
var origJs = require.extensions['.js'];
require.extensions['.js'] = function (module, fileName) {
var output;
if (fileName.indexOf('node_modules/react-native/Libraries/react-native/react-native.js') >= 0) {
fileName = path.resolve('./test/mocks/react-native.js');
}