View react-query-lite.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { usePrevious } from './usePrevious' | |
export type QueryStatus = 'idle' | 'loading' | 'error' | 'success' | |
type QueryClientProviderProps = { | |
children: React.ReactNode | |
client: QueryClient | |
} |
View build-index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lunr = require('lunr') | |
require('lunr-languages/lunr.stemmer.support')(lunr) | |
require('lunr-languages/lunr.fr')(lunr) | |
require('./lunr.unicodeNormalizer')(lunr) | |
var idx = lunr(function () { | |
this.use(lunr.fr) | |
this.use(lunr.unicodeNormalizer) | |
... |
View Row.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glamorous from 'glamorous' | |
const Row = glamorous.div(({ extended }) => ({ // THIS IS OK | |
position: 'relative', | |
maxWidth: extended ? 1330 : 1200, | |
margin: '0 auto', | |
boxsizing: 'border-box', | |
display: 'flex', | |
flexDirection: 'row', | |
flexWrap: 'wrap', |
View Component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes, Component } from 'react' | |
import { | |
Animated, | |
ScrollView, | |
Text, | |
View, | |
} from 'react-native' | |
import EStyleSheet from 'react-native-extended-stylesheet' | |
const styles = EStyleSheet.create({ |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "este-app", | |
"description": "Robust and comfortable dev stack for isomorphic web apps", | |
"author": "Daniel Steigerwald", | |
"version": "9.2.0", | |
"private": true, | |
"scripts": { | |
"postinstall": "cd node_modules/material-ui && npm install && npm uninstall react && gulp build --production", | |
"start": "node src/server", | |
"test": "gulp test", |
View CursorsExample.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<App> | |
<Component> | |
<Component2> | |
<Component3> | |
<Child/> | |
</Component3> | |
</Component2> | |
</Component> | |
</App> |
View Datafetching.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Promise from 'bluebird'; | |
import Immutable from 'immutable'; | |
import Router from 'react-router'; | |
import Flux from '../../client/lib/flux/flux'; | |
import store from '../../client/app/store'; | |
import initialState from '../initialstate'; | |
import stateMerger from '../lib/merger'; | |
import routes from '../../client/routes'; | |
import allActions from '../../client/app/allActions'; | |
import APIUtils from '../../client/libs/APIUtils'; |
View 1_server_frontend_index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import favicon from 'serve-favicon'; | |
import compression from 'compression'; | |
import config from '../config'; | |
import esteHeaders from '../lib/estemiddleware'; | |
import express from 'express'; | |
import intlMiddleware from '../lib/intlmiddleware'; | |
import render from './render'; | |
import userState from './userstate'; | |
import fetchData from './fetchData'; |
View actions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function loadAllTodos() { | |
const promise = new Promise((resolve, reject) => { | |
Api.get() | |
.then(res => { | |
resolve(res); | |
}) | |
.catch(err => { | |
reject(err); | |
}) |
View React Example 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* EXAMPLE 2 */ | |
//Parent component | |
class App extends React.Component { | |
render() { | |
return <div> | |
<First/> | |
<Second /> | |
</div>; |