Last active
October 1, 2019 20:52
-
-
Save anderjs/d777f96e9928f852214adb624f651db7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useMemo } from 'react' | |
const Component = () => { | |
const getColor = useMemo(() => { | |
const colors = ['danger', 'warning', 'secondary] | |
return colors.find((_color, index) => index === step) | |
}, [step]) | |
return ( | |
<React.Fragment> | |
</React.Fragment> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment