0

this function focus is called when hover and in react

const focus = (value: number) => {
        setStyle({transform: "scale(1.5) translateY(-10px)"})
        taskBar[value].props.style = style
        console.log(taskBar[value].props.style)
    }

Basically im trying to add an style to my item but im getting this issue

Cannot assign to read only property 'style' of object '#

Why ?

  • Is it the same as [this SO question](https://stackoverflow.com/questions/64243292/ts-2540-cannot-assign-to-style-because-it-is-a-read-only-property), by any chance? – Jake Mar 05 '23 at 19:34
  • If not, a larger code snippet will probably be helpful - in particular, I think I'd like to know where the `taskBar` variable is coming from, and what its type is – Jake Mar 05 '23 at 19:35

0 Answers0