Functions and methods in Borstch

Anton Ioffe - October 31st 2021 - 1 minutes 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.

Don't Get Left Behind:
The Top 5 Career-Ending Mistakes Software Developers Make
FREE Cheat Sheet for Software Developers