huridocs/uwazi

View on GitHub
app/react/Forms/components/FormValue.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { connect } from 'react-redux';
import { getModel } from 'react-redux-form';

export const FormValue = ({ value, children }) => children(value);

export const mapStateToProps = (state, { model }) => ({ value: getModel(state, model) });

export default connect(mapStateToProps)(FormValue);