BigAB/react-view-models

Don't naively copy all methods to the props object

BigAB opened this issue · 0 comments

BigAB commented

Right now, when using a view-model as the connected source, @bigab/react-view-models copies and binds all the methods of an instance to the props object.

This should be smarter and rely on the methods defined in the observable definitions object

also

For a viewModel, maybe the methods should not be copied and bound every time, they should be bound once during the connect methods and just cached and Object.assign()ed on when props update