import React , { useCallback } from 'react' ; import { useMutation } from '@apollo/react-hooks' ; import { CreateStoryTags } from 'components' ; import { UPDATE_DRAFT } from 'graphqls' ; const Container = ( ) => { const [ updateDraft ] = useMutation ( UPDATE_DRAFT ) ; const updateTags = useCallback ( ( tags ) => { updateDraft ( { variables : { tags } } ) ; } , [ updateDraft ] ) ; return ( < CreateStoryTags updateTags = { updateTags } / > ) ; } ; export default React . memo ( Container ) ;