Skip to content

bautes/utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hooks

useWeinre

Injects the weinre script in the body.

useWeinre(?"<url_weinre_target")

useModal

The idea here is to avoid adding extra html in the components to show the modal. The only issue is the extra ReactDOM.render which will require to wrap once again the ThemeContext and the i18nContext.

Usage:

import useModal, { MODALS } from './useModal';

const YourComponent = () => {
   const {open, close, toggle} = useModal(MODALS.myModal);

  return (
    <div>
        <button onClick={modal.open}>
        ....
    </div>
  )
}

About

Various function utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published