The utils library contains smalls re-usable utils/decorators/helpers for Meniga projects
This is a set of utility helpers to work with recompose.
Hook into the component did mount life cycle event in recompose
Hook into the component did update life cycle event in recompose
DEPRECATED. Use componentDidUpdate instead.
DEPRECATED. Use componentDidMount instead.
Hook into the component will unmount life cycle event in recompose
Connect the redux store in a HOC
Create a context method from a single object in recompose
Create hooks in recompose that attach to window resizing and store in the windowSize state
Create hook in recompose that attaches to window event to supply the elements position in the position state
Create a props object with the given PropType
Create a props object that contains react handlers for keyboard enter and space to trigger an onClick handler
Returns a flattened list of child elements
Create a list of types with a given prefix
Some utility functions for setting known properties on state such as error information
Test if the first string includes the second string
String format
Does case insensitive string comparison
Takes in a set of props to watch and detects if they have changed at all between 2 props objects
Sort a result set by relevance with a given matchText
Generate a unique (UUID format) id string
Dispatch a resize event to the window object
Detect various devices:
- isMobile
- isMobileOrTablet
- isTablet
- isIOS
- isAndroid
Utility functions for working with the query string
- getQueryString
- appendToQuery
- getFilterQuery
- getIncludeQuery
- getSkipAndTakeQuery
Make a tree from a parent / child structure
Add 'other' category to category tree
Sorts an array of strings or an array of objects