This file contains hidden or 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 { Router, Route, Link } from 'react-router' | |
const App = React.createClass({/*...*/}) | |
const About = React.createClass({/*...*/}) | |
// etc. | |
const Users = React.createClass({ | |
render() { | |
return ( |
This file contains hidden or 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
function objectEquals(x, y) { | |
'use strict'; | |
if (x === null || x === undefined || y === null || y === undefined) { return x === y; } | |
// after this just checking type of one would be enough | |
if (x.constructor !== y.constructor) { return false; } | |
// if they are functions, they should exactly refer to same one (because of closures) | |
if (x instanceof Function) { return x === y; } | |
// if they are regexps, they should exactly refer to same one (it is hard to better equality check on current ES) | |
if (x instanceof RegExp) { return x === y; } |
This file contains hidden or 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 { Card, Navigation } from 'react-router-navigation' | |
import App from '@scenes/App' | |
import Auth from '@scenes/Auth' | |
import Launch from '@scenes/Launch' | |
import Welcome from '@scenes/Welcome' | |
const Root = () => ( | |
<Navigation hideNavBar> |
This file contains hidden or 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 { Image, View } from 'react-native' | |
import { Card, Navigation } from 'react-router-navigation' | |
import { Connection, Inscription, Main } from '@Auth/modules' | |
import { BackButton } from '@components' | |
import logo from '@assets/images/logo.png' | |
import styles from './styles' |
This file contains hidden or 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 { View } from 'react-native' | |
import { Route, Redirect, Switch } from 'react-router' | |
import { BottomNavigation, Tab } from 'react-router-navigation' | |
import { Home, Search, Profile } from '@App/modules' | |
import getIcon from '@helpers/icon' | |
import { BRAND_COLORS } from '@theme/colors' | |
import styles from './styles' |
This file contains hidden or 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, { Component } from 'react' | |
import { Fetch } from 'react-data-fetching' | |
export default class App extends Component { | |
render() { | |
return ( | |
<Fetch | |
url="https://api.github.com/users/octocat" | |
> | |
{({ data }) => ( |
This file contains hidden or 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, { Component } from 'react' | |
import { View, Text } from 'react-native' | |
import { Fetch } from 'react-data-fetching' | |
export default class Container extends Component { | |
render() { | |
return ( | |
<Fetch | |
url="https://api.nyan.com/cats/squad" | |
method="POST" |
This file contains hidden or 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, { Component } from 'react' | |
import { Fetch } from 'react-data-fetching' | |
// Just here for better understanding | |
import { Articles, ErrorModal, Loader } from './components' | |
export default class News extends Component { | |
state = { title: 'News' } | |
renderContent = ({ error, data }) => { |
This file contains hidden or 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, { Component, Fragment } from 'react' | |
import { Fetch } from 'react-data-fetching' | |
// Just here for better understanding | |
import { PostsList } from './components' | |
export default class Timeline extends Component { | |
state = { | |
isLoadingMore: false, | |
posts: undefined, |
This file contains hidden or 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 { Provider } from 'react-redux' | |
import { ConnectedFetch } from 'react-data-fetching' | |
import App from './app' | |
const Root = () => ( | |
<Provider store={store}> | |
<ConnectedFetch | |
api="htpps://api.nyan.com" |
OlderNewer