Issue
As an appsmith developer, I often encounter errors when building my app. Some of these errors are caused by bugs in the appsmith codebase, while others are due to my own mistakes. To reduce errors, I have adopted the following three tips: using async/await properly, using ternary operators when appropriate, and utilizing JsObjects to write clean and reusable code. By following these tips, I can build more reliable and efficient apps on appsmith.
Resolution
As an appsmith developer, it's important to reduce errors in your app. One way to do this is by adopting async/await and using it properly to fetch data from data sources such as APIs and databases. You should also avoid multiple uses of the same data property and instead use a variable to store the response from the data source.
Another tip is to use ternary operators when referencing values from widgets or the appsmith store. This allows you to insert a default value if the user does not provide a value. For instance, if you have a select widget, you can use the filtered value inside a query by using a ternary operator.
Finally, using a JsObject can make it easier to write clean and reusable code that you can share among different widgets. You can use async/await and catch API errors, making it easier to debug your app in the long run. By following these tips, you can reduce errors and build more reliable apps.