GithubHelp home page GithubHelp logo

rasitcolakel / assignment-3-rasitcolakel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patika-218-akbank-reactnative-bootcamp/assignment-3-rasitcolakel

0.0 0.0 0.0 30.17 MB

assignment-3-rasitcolakel created by GitHub Classroom

Shell 0.54% JavaScript 1.22% Ruby 1.44% C++ 7.91% Objective-C 2.73% Java 17.99% TypeScript 60.72% Objective-C++ 5.04% Makefile 1.72% Starlark 0.68%

assignment-3-rasitcolakel's Introduction

Open in Visual Studio Code

Assignment: [Assignment 3]

## React Native Async Storage Usage Async storage is used to store data in the device.

getItem

async function getItem(key) {
  try {
    const value = await AsyncStorage.getItem(key);
    if (value !== null) {
      // We have data!!
      return value;
    }
  } catch (error) {
    // Error retrieving data
  }
}

setItem

async function setItem(key, value) {
  try {
    await AsyncStorage.setItem(key, value);
  } catch (error) {
    // Error saving data
  }
}

removeItem

async function removeItem(key) {
  try {
    await AsyncStorage.removeItem(key);
  } catch (error) {
    // Error removing data
  }
}

How to use AsyncStorage in React Native

Async storage is used to store data in the device.

setItem

async function setItem(key, value) {
  try {
    await AsyncStorage.setItem(key, value);
  } catch (error) {
    // Error saving data
  }
}

getItem

async function getItem(key) {
  try {
    const value = await AsyncStorage.getItem(key);
    if (value !== null) {
      // We have data!!
      return value;
    }
  } catch (error) {
    // Error retrieving data
  }
}

removeItem

async function removeItem(key) {
  try {
    await AsyncStorage.removeItem(key);
  } catch (error) {
    // Error removing data
  }
}

React Native Fast Image Usage

It is used to load images from the internet.

FastImage

import FastImage from 'react-native-fast-image';

FastImage.preload([
  {uri: 'https://facebook.github.io/react-native/img/tiny_logo.png'},
  {uri: 'https://facebook.github.io/react-native/img/tiny_logo.png'},
]);

FastImage

import FastImage from 'react-native-fast-image';

<FastImage
  source={{
    uri: 'https://facebook.github.io/react-native/img/tiny_logo.png',
    priority: FastImage.priority.normal,
  }}
  style={{ width: 50, height: 50 }}

Moment.js

Moment is used to format dates.

import moment from 'moment';

moment().format();

ScreenShots (Light Theme)

ScreenShots (Dark Theme)

Preview

To see the preview, please visit this link.

assignment-3-rasitcolakel's People

Contributors

rasitcolakel avatar github-classroom[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.