Skip to main content
2 respostas
  1. 6 de nov. de 2021, 06:20

    Basically, The controller is the JS file that gets requests from the Component now the first thing we do is write most of the logic in the helper file and the Controller just calls the method defined in the helper the reason is it makes code look cleaner but the main reason is now since you have a method in helper file if you want to call it again then you can call it multiple times from controller method so any function that should act as a reusable function you should define it in helper. any function that we define in controller can only accept 3 parameters in the same order component, event, helper. so it can't contain a normal function that expects dynamic values as Parameter that you can only do in helper file 

0/9000