Skip to content

Instantly share code, notes, and snippets.

View yogeshdecodes's full-sized avatar
🚀
Self Learner

Yogesh Yadav yogeshdecodes

🚀
Self Learner
View GitHub Profile
@yogeshdecodes
yogeshdecodes / file-upload.tsx
Created June 29, 2021 10:30 — forked from Sqvall/file-upload.tsx
File Upload with Chakra UI and react-hook-form
import { ReactNode, useRef } from 'react'
import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react'
import { useForm, UseFormRegisterReturn } from 'react-hook-form'
import { FiFile } from 'react-icons/fi'
type FileUploadProps = {
register: UseFormRegisterReturn
accept?: string
multiple?: boolean
children?: ReactNode
@yogeshdecodes
yogeshdecodes / vue.md
Created September 24, 2021 17:36 — forked from DawidMyslak/vue.md
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.