ich Störung erhalte:Reagieren: default Requisiten Fehler
Unexpected token (14:21)
12 | class MeetingMap extends React.Component {
13 |
> 14 | static propTypes = {
| ^
15 | accountId: PropTypes.string.isRequired
16 | };
17 |
Hier Code:
static propTypes = {
account: PropTypes.string.isRequired
};
static defaultProps = {
account: ''
};
Was bin ich? Vielen Dank.
übertragen Sie Ihren Code zu ES7? – madox2
Ich habe es so gemacht und es funktioniert 'MeetingMap.defaultProps = {account: ''}', unter der Klasse positioniert und dann exportiert. –