BemtvJS
CtrlK
Github
  • README
  • Getting started
  • Introducing Brackethtml
  • Creating components
  • Defining the template
  • Rendering
  • Styling the component
  • .css() methods
  • SuperComponent
  • Hooks
  • Handling events
  • Isolated and special variables
  • Component proxies
  • No “props”!
  • Functional components - onInst()
  • DOM Elements
  • Bindings
  • Transformation Functions
  • Router(automatic routing)
    • Capturing errors
    • useRouteControl()
  • Lazy components
  • Suspense
  • State management
  • Keeping the instance running
  • run() - For all
  • Checking available components
  • And that’s it
Powered by GitBook
On this page

run() - For all

It may happen that we need to execute a function that affects all instances of a component, for that we can use the run() method that will internally execute the function passed to each instance of the component created up to that moment:

import { _ } from "bemtv";

const { run } = _`App`();

run(()=>{});
PreviousKeeping the instance runningNextChecking available components

Last updated 2 years ago