import React from 'react' import {selectVariables, selectTagStats} from '../selectors' import {connect} from 'react-redux' import {bindActionCreators} from 'redux' import * as actions from '../actions' const Variable = ({data: {variable, tags}}) =>
  • {variable}

  • class Explorer extends React.Component { render() { let {tags, actions, variables} = this.props return (

    Les prélèvements sociaux sur les salaires

    ) } } class TagSelect extends React.Component { render(){ let {tag: {name, choices, number}, selectTag} = this.props return (
  • {`${name} (${number} variables)`}
  • ) } } const mapStateToProps = state => ( { variables: selectVariables(state), tags: selectTagStats(state) } ) const actionsToProps = dispatch => ({ actions: bindActionCreators(actions, dispatch), }) const VariableExplorer = connect(mapStateToProps, actionsToProps)(Explorer) export default VariableExplorer