thearnica/react-uid

Q: How to use a prefix

donifer opened this issue · 1 comments

Is there a way to set a prefix for useUID hook?

I'm want to prefix some ids such as input-1, is the recommended approach just to append the string myself?

I think it would be useful if we could do something like useUID('input');

const useInputUID = () => `input-${useUID()}`;