score:3

Accepted answer
class PostOptionBar extends Component {

    textType(postType) {
        this.props.changeType(postType);  // call the parent component to update the state
    }

    render() {
        return (
            ...
        );
    }
}

score:2

this.props.postType

Related Query

More Query from same tag