Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

import image as component react

import { ReactComponent as Image } from "./assets/example-image.png";
Comment

import an image in react

import mainLogo from'./logoWhite.png';

//then in the render function of Jsx insert the mainLogo variable

class NavBar extends Component {
  render() {
    return (
      <nav className="nav" style={nbStyle}>
        <div className="container">
          //right below here
          <img  src={mainLogo} style={nbStyle.logo} alt="fireSpot"/>
        </div>
      </nav>
    );
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript text replace 
Javascript :: difference between find and filter javascript 
Javascript :: mdn rest 
Javascript :: react download file from express res.download 
Javascript :: reverse words javascript 
Javascript :: get the last day of the month in js 
Javascript :: switch in react 
Javascript :: textalignvertical not working in ios react native 
Javascript :: how set default value for react-select 
Javascript :: yup number string 
Javascript :: draw on canvas from video element js 
Javascript :: how to load existing json data in nuxt 
Javascript :: javascript copy 2d array 
Javascript :: how to change background color on scroll 
Javascript :: disabled radio button 
Javascript :: iife js arrow function 
Javascript :: timepicker in jquery 
Javascript :: js check if two arrays contain same values 
Javascript :: javascript insert element after 
Javascript :: remove all duplicates from an array 
Javascript :: get element of an array inside another array 
Javascript :: alphabet to number javascript 
Javascript :: sort strings javascript alphabetically 
Javascript :: chart js in angular 13 
Javascript :: remove an element from array 
Javascript :: javascript fibonacci example 
Javascript :: javascript auto scroll a page to top 
Javascript :: js get selected option element 
Javascript :: jquery find 
Javascript :: for loop string array javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =