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 { requestToApi } from 'react-data-fetching' | |
// Just here for better understanding | |
import { ChatFeed } from './components' | |
export default class Chat extends Component { | |
state = { messages: null } | |
async componentDidMount() { |
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 { Image, View, Text } from 'react-native' | |
import { Fetch } from 'react-data-fetching' | |
export default class Container extends Component { | |
render() { | |
return ( | |
<Fetch path="store"> | |
{({ data }) => ( | |
<View> |
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 ( | |
<> | |
// Without <ConnectedFetch> | |
<Fetch |
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" |
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, { 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 } 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' | |
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 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 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' |
NewerOlder