Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
import { TransitionMotion, spring } from 'react-motion';
const leavingSpringConfig = { stiffness: 60, damping: 15 };
export default class Ripple extends Component {
constructor(props) {
super(props);
this.state = {
mouse: [],
import React, { Component } from 'react';
export default class App extends Component {
constructor() {
super();
this.state = {
animating: false,
visible: false,
require('babel-core/register');
module.exports = function karmaConfig (config) {
config.set({
frameworks: [
'mocha'
],
reporters: [
it('sorts by given value of properties', () => {
const state = [
{ name: 'Edward', value: 21 },
{ name: 'Sharpe', value: 37 },
{ name: 'And', value: 45 },
{ name: 'The', value: -12 },
{ name: 'Magnetic' },
{ name: 'Zeros', value: 37 }
];
const nextState = state.sort( (a,b) => {
export const INCREASE = 'INCREASE';
export const DECREASE = 'DECREASE';
This file has been truncated, but you can view the full file.
108054 silly gunzTarPerm extractEntry node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json
108055 silly gunzTarPerm extractEntry fn/function/has-instance.js
108056 silly gunzTarPerm modified mode [ 'fn/function/has-instance.js', 438, 420 ]
108057 silly gunzTarPerm extractEntry fn/function/index.js
108058 silly gunzTarPerm modified mode [ 'fn/function/index.js', 438, 420 ]
108059 silly gunzTarPerm extractEntry library/fn/string/raw.js
108060 silly gunzTarPerm modified mode [ 'library/fn/string/raw.js', 438, 420 ]
108061 silly gunzTarPerm extractEntry library/fn/string/repeat.js
108062 silly gunzTarPerm modified mode [ 'library/fn/string/repeat.js', 438, 420 ]
108063 silly gunzTarPerm extractEntry string/#/normalize/index.js
var x = /\s/g;
var y = /(.{4})/g;
const initialState = {
number: ''
}
//console.log(initialState)
function reducer(state = initialState, action) {
console.log("current state is ", state, "current action is ", action);
switch(action.type) {
import { PROCESS_NUMBER } from '../Constants/ActionTypes';
export function processNumber(number) {
return { type: PROCESS_NUMBER, number }
}
import React from 'react';
class CreditCardInput extends React.Component {
constructor(props) {
super(props);
this.state = { number: '' };
this.handleChange = this.handleChange.bind(this);
this.checkType = this.checkType.bind(this);
}
@renren89
renren89 / app.jsx
Last active October 31, 2019 09:46
import { render } from 'react-dom';
import React, { Component } from 'react';
import { createStore } from 'redux';
import { connect, Provider } from 'react-redux';
const reducer = (state = 0, action) => {
console.log('current state is ', state, 'and action is', action);
switch (action.type) {
case 'INCREASE':