import {createContext, useState, useMemo} from 'react'

const ParolesListContext = createContext()

export function ParolesListContextProvider(props) {
  const [paroles, setParoles] = useState([])

  const value = useMemo(() => ({
    paroles,
    setParoles
  }), [paroles])

  return (
    <ParolesListContext.Provider value={value} {...props} />
  )
}

export const ParolesListContextConsumer = ParolesListContext.Consumer

export default ParolesListContext
