score:1

Accepted answer
message={this.descriptionText || 'some default value or empty string'}

score:2

getInitialState() {
    return {
        descriptionText: 'default text'
    }
},

toggleDescription(product, success = true) {
    if (success) {
      this.setState({
          descriptionText: t('products/product_description', {
              name: item.product,
          }),
          open: !open,
          failure: !success
      });
},

render() {
    return (
  <div>
  </Description
  isOpen={this.state.open}
  onRequestClose={this.state.toggleDescription}
  message={this.state.descriptionText}
  isError={failure}
  >
  <div> --delete and close buttons here-- </div>
  </Description>

Related Query

More Query from same tag