I want to create a Vue.js component that receives properties from its parent component, e.g.:
<table-cell :value="foo" format="date" />
Because value and format are defined as properties, Vue will automatically register observers to their values. That is fine in general, but for my use case I positively know those values are not going to change so they don't need to be observed.
Given that my table cell component can be in a table with, say, 1,000 rows and 10 columns, those 2 properties will create 20,000 observers, and I want to avoid all this overhead (and my real table cell component has more complex properties).
Is there any way to disable a component property from being observed in order to avoid wasting CPU & memory resources?
Update: I have found a low-level solution with the functional component approach, explained here: https://v2.vuejs.org/v2/guide/render-function.html#Functional-Components
I have tested it with this JSFiddle: https://jsfiddle.net/50wL7mdz/12143/
I wonder if that is the correct approach...