huridocs/uwazi

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
Definition for rule 'node/no-restricted-import' was not found.
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) });
 
Prefer named exports.
export default connect(mapStateToProps)(FormValue);