Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react native image from web

import React from 'react';
import { View, Image, StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  container: {
    paddingTop: 50,
  },
  tinyLogo: {
    width: 50,
    height: 50,
  },
  logo: {
    width: 66,
    height: 58,
  },
});

const DisplayAnImage = () => {
  return (
    <View style={styles.container}>
      <Image
        style={styles.tinyLogo}
        source={require('@expo/snack-static/react-native-logo.png')}
      />
      <Image
        style={styles.tinyLogo}
        source={{
          uri: 'https://reactnative.dev/img/tiny_logo.png',
        }}
      />
      <Image
        style={styles.logo}
        source={{
          uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAAEXRFWHRTb2Z0d2FyZQBwbmdjcnVzaEB1SfMAAABQSURBVGje7dSxCQBACARB+2/ab8BEeQNhFi6WSYzYLYudDQYGBgYGBgYGBgYGBgYGBgZmcvDqYGBgmhivGQYGBgYGBgYGBgYGBgYGBgbmQw+P/eMrC5UTVAAAAABJRU5ErkJggg==',
        }}
      />
    </View>
  );
}

export default DisplayAnImage;
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to add react.memo in export list 
Javascript :: interactive svg javascript 
Javascript :: array.length 
Javascript :: error handling in node js 
Javascript :: use effect hook 
Javascript :: how to take input n number in js 
Javascript :: how to access node js server from another computer 
Javascript :: jquery parse html 
Javascript :: React S3 Bucket 
Javascript :: angularjs form validation on submit 
Javascript :: The reduce() method executes a reducer function on each element of the array and returns a single output value. 
Javascript :: react native ant design 
Javascript :: conditional operator 
Javascript :: how to search and filter js 
Javascript :: mongoos populate a ref 
Javascript :: sequelize db:create test environment 
Javascript :: react onchange url 
Javascript :: of rxjs 
Javascript :: debug javascript in chrome 
Javascript :: filter buttons react 
Javascript :: Return an html element with react 
Javascript :: how to make a vertical array js 
Javascript :: set a variable in express.js 
Javascript :: if statemnt shorthand js without else 
Javascript :: javascript addeventlistener click only works once 
Javascript :: jquery properly work 
Javascript :: how to write a range of numbers in if condition js 
Javascript :: concat no and string in javascript 
Javascript :: js new array 
Javascript :: js slice 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =