Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Error when including literallycanvas in my current react app (React 16.8.6) #539

Open
nikoladeon opened this issue May 16, 2019 · 0 comments

Comments

@nikoladeon
Copy link

nikoladeon commented May 16, 2019

Hi all,

I have built a working react application and wanted to include the literally canvas tool in it.
So I copied the relevant folders to a root level folder within my application folder and wanted to include the canvas tool in my index.js file.
But unfortunately I receive an error

„Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.“.

Seems to be something wrong with the ReactDOM.render method, but I am not able to wrap my head around what is wrong here.

Thank you so much for your support / ideas!

Best regards,
Nikolas

Code of index.js is the following:
import React from 'react';
import ReactDOM from 'react-dom';
import LC from './literallycanvas/js/LiterallyCanvas';
import './literallycanvas/css/literallycanvas.css'

ReactDOM.render(
<div>
<LC.LiterallyCanvasReactComponent imageURLPrefix="/literallycanvas/img" />
</div>,
document.getElementById('root'));

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant