Skip to content

Instantly share code, notes, and snippets.

@vojtatranta
Created October 27, 2018 08:57
Show Gist options
  • Save vojtatranta/b298920ea37e8b713ee20768c750b356 to your computer and use it in GitHub Desktop.
Save vojtatranta/b298920ea37e8b713ee20768c750b356 to your computer and use it in GitHub Desktop.
export default (fetch, appConfig) => ({
getWords: input => fetch(`${appConfig.apiUrl}/words/?input=${input}`)
})
// předání do root komponenty
export default class App extends React.PureComponent<null> {
render() {
return <RootContainer api={createApi(fetch, appConfig)} />
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment