Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

insert image in react

import React from 'react';
import logo from './logo.png'; // Tell webpack this JS file uses this image

console.log(logo); // /logo.84287d09.png

function Header() {
  // Import result is the URL of your image
  return <img src={logo} alt="Logo" />;
}

export default Header;
Comment

PREVIOUS NEXT
Code Example
Javascript :: lodash deep compare two objects 
Javascript :: move div with the mouse in js 
Javascript :: vuejs input text 
Javascript :: console table js 
Javascript :: make contenteditable false javascript 
Javascript :: axios get error response message 
Javascript :: start angular app server 
Javascript :: add item to list javascript 
Javascript :: javascript clear all cookies 
Javascript :: run from build react 
Javascript :: jquery on checkbox change 
Javascript :: faker.js name 
Javascript :: AWS S3 JavaScript example 
Javascript :: match password and confirm password in javascript if true then submit form 
Javascript :: get looping in jquery 
Javascript :: union of two objects javascript 
Javascript :: how to edit website 
Javascript :: regular expression javascript password strength 
Javascript :: react router dom install 
Javascript :: timestamp to date javascript 
Javascript :: discord.js find role by name 
Javascript :: js convert truthy 
Javascript :: button in vanilla js 
Javascript :: react fetch url 
Javascript :: html javascript type 
Javascript :: javascript capitalize first letter of each word 
Javascript :: print placeholder value javascript 
Javascript :: how to make proptypes either or 
Javascript :: 3 = signs in javasdcript 
Javascript :: metamask event disconnect 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =