How to use the recompose/pure function in recompose

To help you get started, we’ve selected a few recompose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mui-org / material-ui / src / svg-icons / image / gradient.jsx View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let ImageGradient = (props) => (
  
    
);
ImageGradient = pure(ImageGradient)
ImageGradient.displayName = 'ImageGradient';

export default ImageGradient;
github mui-org / material-ui / src / svg-icons / notification / sync.jsx View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let NotificationSync = (props) => (
  
    
);
NotificationSync = pure(NotificationSync)
NotificationSync.displayName = 'NotificationSync';

export default NotificationSync;
github mui-org / material-ui / src / svg-icons / av / sort-by-alpha.jsx View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let AvSortByAlpha = (props) => (
  
    
);
AvSortByAlpha = pure(AvSortByAlpha)
AvSortByAlpha.displayName = 'AvSortByAlpha';

export default AvSortByAlpha;
github mui-org / material-ui / src / svg-icons / action / translate.js View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let ActionTranslate = (props) => (
  
    
);
ActionTranslate = pure(ActionTranslate);
ActionTranslate.displayName = 'ActionTranslate';
ActionTranslate.muiName = 'SvgIcon';

export default ActionTranslate;
github marmelab / react-admin / packages / ra-ui-materialui / src / field / SelectField.tsx View on Github external
{...sanitizeRestProps(rest)}
        >
            {translateChoice
                ? translate(choiceName, { _: choiceName })
                : choiceName}
        
    );
};

SelectField.defaultProps = {
    optionText: 'name',
    optionValue: 'id',
    translateChoice: true,
};

const EnhancedSelectField = pure(SelectField);

EnhancedSelectField.defaultProps = {
    addLabel: true,
};

EnhancedSelectField.propTypes = {
    ...Typography.propTypes,
    ...fieldPropTypes,
    choices: PropTypes.arrayOf(PropTypes.object).isRequired,
    optionText: PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.func,
        PropTypes.element,
    ]),
    optionValue: PropTypes.string,
    translateChoice: PropTypes.bool,
github mui-org / material-ui / src / svg-icons / editor / insert-chart.jsx View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let EditorInsertChart = (props) => (
  
    
);
EditorInsertChart = pure(EditorInsertChart)
EditorInsertChart.displayName = 'EditorInsertChart';

export default EditorInsertChart;
github mui-org / material-ui / src / svg-icons / image / transform.js View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let ImageTransform = (props) => (
  
    
);
ImageTransform = pure(ImageTransform);
ImageTransform.displayName = 'ImageTransform';
ImageTransform.muiName = 'SvgIcon';

export default ImageTransform;
github mui-org / material-ui / src / svg-icons / communication / import-export.js View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let CommunicationImportExport = (props) => (
  
    
);
CommunicationImportExport = pure(CommunicationImportExport);
CommunicationImportExport.displayName = 'CommunicationImportExport';
CommunicationImportExport.muiName = 'SvgIcon';

export default CommunicationImportExport;
github mui-org / material-ui / src / svg-icons / image / wb-auto.js View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let ImageWbAuto = (props) => (
  
    
);
ImageWbAuto = pure(ImageWbAuto);
ImageWbAuto.displayName = 'ImageWbAuto';
ImageWbAuto.muiName = 'SvgIcon';

export default ImageWbAuto;
github mui-org / material-ui / src / svg-icons / action / credit-card.js View on Github external
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';

let ActionCreditCard = (props) => (
  
    
);
ActionCreditCard = pure(ActionCreditCard);
ActionCreditCard.displayName = 'ActionCreditCard';
ActionCreditCard.muiName = 'SvgIcon';

export default ActionCreditCard;