- Remember to class to expose and attach
className
to styled component so you can extend an existing styled component. object oriented css baby!
- combine
lodash/uniqwith
andlodash.isequal
to dedupe an array of objects.
import uniqWith from 'lodash/uniqwith';
import isEqual from 'lodash.isequal';
const arrayOfObjects = [
{
id: 1
content: 'a'
},
{
id: 1
content: 'a'
},
{
id: 2,
content: 'b'
}
]
return uniqWith(arrayOfObjects , isEqual)