Memory management when passing data to an HTML component

What is JourneyApps’s best practice recommendations on memory management when passing data to an HTML component

This doesn’t really have anything to do with memory management since passing data to a component is an encoding / decoding operation while data is in transit over IPC. Once the data gets to the component however, its up the developer to follow proper memory management techniques and caching of which there are many things to look out for.

  1. Make sure that you do not hold references to HtmlDOMElements
  2. Make sure to unregister listeners
  3. Make sure to dispose objects in libraries correct
  4. Follow guidelines in any libraries you are using such as React etc where the Fibre engine shows you warnings on memory leaks etc.
  5. Be wary of too many _.template calls.
  6. Be wary of _.memoize