Skip to content

Instantly share code, notes, and snippets.

View cauldyclark15's full-sized avatar

Joselie Castaneda cauldyclark15

View GitHub Profile
import DataLoader from 'dataloader';
import InventoryItemService from './InventoryItemService';
const cache = String(process.env.CACHE).toLowerCase() === 'true';
const inventoryItemService = new InventoryItemService();
export const inventoryItem = new DataLoader(
keys => Promise.all(keys.map(inventoryItemService.findById)),
import React, { Component } from 'react';
import Header from 'components/Header';
import PropTypes from 'prop-types';
import { withRouter, Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { get, isEmpty } from 'lodash';
import { Wrapper } from './styles';
import Library from '../Library';
import BuilderMain from './partials/BuilderMain';
import React from 'react';
import PropTypes from 'prop-types';
import Downshift from 'downshift';
import {
InputWrapper,
InputMainWrapper,
ClearButtonWrapper,
} from './styles/fiddleStyles';
import CategoriesDropdown from './CategoriesDropdown';

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).

@cauldyclark15
cauldyclark15 / fuzzyregex.js
Created August 4, 2017 01:20 — forked from samknight/fuzzyregex.js
Fuzzy Regex match
// This will allow unordered search terms to match relevant string
// e.g. Really Long String will be matched by
// - long string
// - long really
// - all ring
// ..etc
// I have used this anonymous function to override the matcher function in select2
function(term, text) {
import React from 'react';
import ReactDOM from 'react-dom';
import TodoTable from './all-todo';
class CreateTodo extends React.Component {
constructor () {
super();
this.state = {
count: 0,
data: []
}
import React from 'react';
import ReactDOM from 'react-dom';
import TodoTable from './all-todo';
class CreateTodo extends React.Component {
constructor () {
super();
this.state = {
count: 0,
data: []
}