I am new to React and have been tasked with updating an existing component (a form). My task is to read a setting from JSON and show or hide an element based on that setting.

The JSON appears like:

```
"forms": {
  "enquiry": {
    "showConfirmCheckbox": "true"
  },
},

```

Using and existing component that already reads this JSON and turns it into context which is called `config`, I can use the above as such:

In my propTypes I have:

```
  static propTypes = {
    config: PropTypes.object.isRequired,
  }

```

And in my render function I just wrap the element in a conditional statement: 

```
{config.forms.enquiry.showConfirmCheckbox &&
            <Checkbox
              etc, etc, etc

```

This works fine. However, I want to add a default for this value just in case the original JSON file is not updated correctly or is missing that entry. To that effect I added this to my defaultProps:

```
static defaultProps = {
    config: {
      forms: {
        enquiry: {
          showConfirmCheckbox: 'true',
        },
      },
    },
}

```

However, this doesn't seem to work.

If I delete the line `'showConfirmCheckbox': 'true'`, from the JSON file the if condition still validates as false - it doesn't pick up the defaultProps value.

Would anyone know how to amend this? Is there something I am doing wrong here?