question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't update className prop

See original GitHub issue

I have a form, which should disable all fields during submission. But I can’t update className prop.

render() {
    const {
      meta: { submitting },
    } = this.props;

    return (
      <Reaptcha
        className={classnames('m-aletheia-captcha', {
          'm-aletheia-captcha--disabled': submitting,
        })}
     />
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sarneehcommented, Dec 28, 2019

Fixed in 1.7.2.

1reaction
sarneehcommented, Dec 10, 2019

@AndyOGo Ohh… I’m sorry! I know where the problem is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing class name of a div doesn't update it's appearance ...
I'm trying to toggle background of a div with changing className every second based on changing the state of a data array.
Read more >
className prop not working with custom DOM elements in ...
The className prop does not appear to get mapped correctly when applied to custom DOM elements in 0.14.0-rc1.
Read more >
HTML DOM Element className Property - W3Schools
Definition and Usage. The className property sets or returns an element's class attribute. ... if "myDIV" has a "myStyle" class, change the font...
Read more >
Pass class names as props to React components | bobbyhadz
To pass class names as props to a React component, pass a string containing the class names as a prop. Destructure the prop...
Read more >
classnames - npm
A simple utility for conditionally joining classNames together. Latest version: 2.3.2, last published: 3 months ago. Start using classnames ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found