If you want to write it to the DOM, pass a string instead: in="true" ...

See original GitHub issue

image

I got an error while rendering StackGrid Component’s Opacity:0 style attribute does not change 😢

I found a strange prop in the div element that render in the Grid Component. image

and it comes GridItem Component image

It looks like a react transition error 😢

Appreciate any help! 🙏

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Gurjapcommented, Sep 6, 2018
import React, { Component } from 'react';
import { Button,Alert, Card, CardBody, CardFooter, Col, Container, Form, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap';
import {forgot_password} from "../../../hooks/functions";
import {Link} from "react-router-dom";

class ForgotPassword extends Component {
  constructor(){
    super();
    this.state = {
      loading: false,
      warningMessage:"",
      visible:false
    };
    this.onForgotPassword=this.onForgotPassword.bind(this);

    this.onDismiss = this.onDismiss.bind(this);
  }
  onDismiss() {
    this.setState({ visible: false });
  }
  onForgotPassword=(e)=>{
    e.preventDefault();
    let {email}=e.target;
    this.setState({
      loading:true
    });
    forgot_password({email:email.value})
      .then(data=>{
          this.setState({
            loading:false,
            visible:true,
            warningMessage:data.message
          });
      })
  };
  render() {
    return (
      <div className="app flex-row align-items-center">
        <Container>
          <Row className="justify-content-center">
            <Col md="6">
              <Card className="mx-4">
                <CardBody className="p-4">
                  <Alert color="info" isOpen={this.state.visible} toggle={this.onDismiss}>
                    {this.state.warningMessage}
                  </Alert>
                  <Form onSubmit={this.onForgotPassword}>
                    <h1>Forgot Password</h1>
                    <p className="text-muted">Enter your email to reset password</p>
                    <InputGroup className="mb-3">
                      <InputGroupAddon addonType="prepend">
                        <InputGroupText>@</InputGroupText>
                      </InputGroupAddon>
                      <Input type="text" placeholder="Email" autoComplete="email" name={"email"}/>
                    </InputGroup>
                    <Button color="success" block>Reset Password</Button>
                    <Link to={"/login"} color="success" block>Back to Login</Link>
                  </Form>
                </CardBody>
              </Card>
            </Col>
          </Row>
        </Container>
      </div>
    );
  }
}
export default ForgotPassword;

I am getting the same warning and this the code. warning

3reactions
rogerpolivercommented, Jan 10, 2020

Thank you all! I’m learning ReactJS and ended here searching for a solution.

I changed from: color={withDraw} to: color={withDraw ? 1 : 0}

and it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Received true for a non boolean attribute jsx
If you want to write it to the DOM, pass a string instead: selectable="false" or selectable={value.toString()}. If you used to conditionally omit it...
Read more >
React DOM element's attribute should not have a value of the ...
This rule applies when React DOM element's attribute value is specified ... Boolean attribute with 'true' or 'false' string value: React ...
Read more >
ReactDOM – React
... the React model if you need to. import * as ReactDOM from 'react-dom';. If you use ES5 with npm, you can write:...
Read more >
How to fix the 'Received "true" for a non-boolean attribute' error
How to fix Received 'true' for a non-boolean attribute error when using styled-components or emotion.
Read more >
Object.prototype.toString() - JavaScript - MDN Web Docs
The toString() method returns a string representing the object. ... Function.prototype.apply() on it, passing the object you want to inspect ...
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