Skip to content

hackerone/WDCDemoApp

Repository files navigation

WDCDemoApp

https://github.com/hackerone/WDCDemoApp

React Native?

  • Build native apps using React.
  • Uses native components and APIs.

Setup

  • Download and install node - https://nodejs.org/en/download/

  • Download expo client on your phone (both iOS and Android supported) - https://expo.io/ (skip if you have iOS Simulator / XCode)

  • Download and install Expo XDE desktop (you'll need to complete the free registration) - https://expo.io/ (skip if you have iOS Simulator / XCode)

Mac users

Getting the code

git clone https://github.com/hackerone/WDCDemoApp.git
npm i

Running on simulator iOS

npm run ios

Running on device (using expo XDE)

npm start
  • Open Expo XDE
  • Login / Create an account.
  • Project > Open Project > select the location where you have cloned the code.
  • Press share button on the desktop app. This will bring up a QR code.
  • Open expo app on your phone and scan the QR code generated in the desktop app.

EX - 1

  • Run the app on simulator or device.
  • Modify the Text to say Hello WebDevCon EU

React UI components & Style

  • <div> > <View>
  • <p>, <h1>, <h2> .. > <Text>
  • <img/> > <Image>
  • <input/> > <TextInput>
  • <button>, <a> > <Button> or <TouchableHighlight>

http://facebook.github.io/react-native/docs/getting-started.html

EX - 2

  • Make the App's background color black
  • Text should be white
  • Place the text box to the top. The text must be left aligned.

EX - 3

  • Replace the text box with search box.
  • Should have a TextInput component, where the user can type keyword.
  • Should have a Button which says Go

https://facebook.github.io/react-native/docs/textinput.html

https://facebook.github.io/react-native/docs/button.html

State management

EX - 4

EX - 5

  • Pressing GO button should fetch Giphy results for the keyword entered.
  • Use getSearchResultItems method from ./utils/api to fetch the results.
  • Refer to sampleGiphyResponse.json for the response format.

EX - 6

  • Display results as a FlatList
  • Display Image instead of plain text.

Routing

EX - 7

  • Create Trending page.
  • Use TabBar to switch between Home Page and Trending Page.
  • Use home.png and trending.png as icons in the TabBar.
  • https://reactnavigation.org/

EX - 8

  • Populate Trending page with content from getTrendingItems

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published