@itcase/common
v1.2.35
Published
Common features like requests, utils
Readme
Requests functions
formatURL(url, addProtocol)sendAxiosRequest({ config, onSuccess, onError })async sendServerSideRequest(urls)
Utils functions
createFileFromDataURL(fileName = 'file', dataURL)getLanguageProp(item = {}, key = '', language)
Note
- Use arrow function for some helpers and utils:
const someUtilFunction = (configURL) => {} - Use function for main things as components and hooks:
function SomeComponent() {}" and "function useSomeThings() {} - Set "export" things always on bottom of file:
import things from 'some/path/things'
...
<<<code>>>
...
export { someNamedTing, someUtilFunction }
export default MainThing