Elements not defined
See original GitHub issueHello there, and thank you for your work. I’ve follow the steps on the doc and I have these erros… 😕 I did the 2 first steps after “usage” for react.
Failed to compile
./src/js/components/modules/dashboard/Dashboard.jsx
Line 10:6: "loading" is not defined no-undef
Line 13:3: "doSomething" is not defined no-undef
Line 19:10: "Button" is not defined react/jsx-no-undef
Search for the keywords to learn more about each error.
In my index.js
const instance = createInstance({
urlBase: "https://stats.level-up.education/",
siteId: 2, // optional, default value: `1`
});
ReactDOM.render(
<MatomoProvider value={instance}>
<Root/>
</MatomoProvider>,
document.getElementById('root')
);
And for the component I just took yours (in the doc).
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: element is not defined
I have created a delete button that deletes a row from my database using jquery and ajax. when i click the button i...
Read more >ReferenceError: Element is not defined · Issue #6610 - GitHub
The issue is that rollup removes unused code. It considers adding const Element = typeof Element === "undefined" ? function () {} :...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >Getting javascript error: element is not defined
I am using javascript to check CSS styles. I'm getting element is not defined in below line. js.executeScript("const repeatValue = element.style ...
Read more >CPython 3 'name element is not defined' - Revit - Dynamo Forum
I'm not a Python Pro, but i think it happens because you only use the variable “element” inside the for loop. So it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@GentillePlume try using this code instead:
@GentillePlume If you want to use a class component make sure to add the
render()
method to your component. I would reccomend to read the React documentation.I am closing this issue as the problem seems to be resolved. Good luck with your app!