标签:end edm pst one div ltm 多语言 return port
/container/中 ,因为 redux
import React from ‘react‘; import {connect} from ‘react-redux‘; import ButtonComponent from ‘scratch-gui/src/components/button/button.jsx‘; import {FormattedMessage} from ‘react-intl‘; class ArduinoButton extends React.Component { render () { const word = ( <FormattedMessage defaultMessage={this.props.message.arduino} description="Button to record a sound in the editor tab" id="arduino" /> ); const { ...props } = this.props; return ( <ButtonComponent {...props} > {word} </ButtonComponent> ); } } const mapStateToProps = state => ({ message: state.intl.messages }); module.exports = connect( mapStateToProps )(ArduinoButton);
标签:end edm pst one div ltm 多语言 return port
原文地址:http://www.cnblogs.com/Oldz/p/7241510.html