Skip to content
Anil Maharjan edited this page Dec 16, 2020 · 15 revisions

Welcome to the comfey wiki!

Comfey is a tiny data-binding library inspired by React hook useState. Comfey helps you manage states in your vanilla JavaScript project. States helps you keep your JavaScript code uncluttered and manageable.

Traditionally or even today, if we are developing features using vanilla Javascript, we follow event-based but imperative approach. A typical

OnDocReady: hideMenu();
OnBurgerClick: showMenu();
OnMenuItemClick:
  hideRootMenu();
  showSubMenu();
  hideLanguageSwitcher();
  appendMenuTitle(current);
  hideFooterMenu();
OnBackClick:
  hideMenuTitle();
  showLanguageSwitcher();
  showRootMenu();
  showFooterMenu();
OnCloseClick: hideMenu();

Table of Content