Skip to content

TypeError: Cannot read property 'oneOf' of undefined - Always thrown #4

@Amertz08

Description

@Amertz08

Regardless of whether or not I hardcode the 'command' prop to the component I get a 'oneOf' property error

import React from 'react';
import Recorder from 'react-recorder';


export default class Recording extends React.Component {

    constructor (props) {
        super(props);
        this.state = {
            command: props.command ? props.command : 'none'
        };
    }

    render () {
        return (
            <div>
                <Recorder command="none" />
            </div>
        )
    }
}

My desire would be for this.state.command to be passed but that also throws the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions