Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Konva React image not displaying

I have a very simple Konva-react app (I've taken it right out of the docs) and it doesn't work (doesn't display the image) displaying two warnings:

  1. Warning: <Image /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
  2. Warning: The tag <Image> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter. My Canvas component:
import { Image } from 'react-konva';
import useImage from 'use-image';

const url = 'https://konvajs.github.io/assets/yoda.jpg';

export default function Canvas() {  
    const [image] = useImage(url);
    return <Image image={image} />;
}

My app component:

import Canvas from './canvas';

function App() {
  return (
    <div className="App">
      <h2>Conva App</h2>
      <Canvas />
    </div>
  );
}

export default App;

How can I fix it?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can't simply render Konva components anywhere. You need to create the <Stage> and a <Layer> component first, and only then add your component:

import { Stage, Layer } from "react-konva";
import Canvas from "./canvas";

function App() {
  return (
    <div className="App">
      <h2>Conva App</h2>
      <Stage width={window.innerWidth} height={window.innerHeight}>
        <Layer>
          <Canvas />
        </Layer>
      </Stage>
    </div>
  );
}

export default App;

You can check this sandbox for a working example.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!