Functions and methods in Borstch

Functions and methods in Borstch

Functions and methods is where you place your frontend application logic.

· 1 minute read

Functions and methods is where you place your frontend application logic.

Methods live in the environment of components. They have access to store, component's data, component's props, functions.

Functions are global and shared across the project. They have access to store and other functions.

Functions and methods can be either syncronous or asyncronous. Asyncronous - means that you write "await" inside of the funciton.

Syncronous funcitions and methods can be used for reactive data computations for css settings, attribute settings, etc.

In order to allow fa funcition or a method to use an other function, the other funciton must be marked as a dependency in the function editor.