All Downloads are FREE. Search and download functionalities are using the official Maven repository.

contexts.RefContext.js Maven / Gradle / Ivy

import LambdaComponent           from 'components/common/LambdaComponent';
import { createContext, useRef } from 'react';

export const CustomRefContext = createContext();

const CustomRefProvider = ({children}) => {
  const ref        = useRef()
  const setCurrent = (value) => ref.current = value
  const getCurrent = () => ref.current

  return (
    
      
				{children}
			
    
  )
}

export default CustomRefProvider;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy