Uncaught Error: Cannot assign to a reference or variable!

compiler.js:15702 Uncaught Error: Cannot assign to a reference or variable!

Solution : –

local reference and id is having same name.

Advertisements

How To Write Better Code In React

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

In this post, I will show you a few tips that will help you become a better React Developer. I will cover a range of things from tooling to actual code style, which can help you improve your skill with React

 

https://blog.bitsrc.io/how-to-write-better-code-in-react-best-practices-b8ca87d462b0

Uncaught Error: To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name: in react JS

Uncaught Error: To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name:

This error come when you have not added Style root Component and you are using media queries or keyframes , animation.

const yog = (props) => {
    const style = {
        '@media(min-width: 500px)':{
                width:'450px'
        }
    }
........

Then import the style root Component from radium.

import Radium, { StyleRoot } from 'radium';
....

put whole app component in styleroot

render() {
return (
 <StyleRoot>
 
</StyleRoot>