JavaScript and jQuery development

jQuery and underscore

ThoughtFarmer 8 comes shipped already with jQuery 2.1.3 as well as underscore 3.7.0. No need for any added references. You can use these libraries in the JavaScript tab when creating custom cards. 

Some best practice guidelines:

  • Wrap all code in the JavaScript tab in a self executing anonymous function in order to avoid polluting global scope.
  • Avoid using DOM manipulation outside of the custom card container element. ReactJS uses a virtual DOM for performance, and elements added via jQuery to React components may not behave as expected (in the very least test thoroughly).