8.0.0
Major Changes
-
#24
16d7a26Thanks @js2me! - removed all marked as deprecation properties and methods- Removed
configproperty inViewModelParamsinterface (renamed tovmConfig) - Removed
linkStoremethod inViewModelSimpleinterface (renamed toattachViewModelStore) - Removed type
ComponentWithLazyViewModel(renamed toVMLazyComponent) - Removed type
ComponentWithViewModel(renamed toVMComponent) - Removed
paramsproperty inViewModelBaseclass (renamed tovmParams)
- Removed
-
#24
16d7a26Thanks @js2me! - modified global payload processingPreviosly
viewModelsConfighaved the following configuration:comparePayload: 'strict', payloadObservable: 'ref', payloadComputed: false,
So it was a bit performance overhead. Now it is:
comparePayload: false, payloadComputed: 'struct', payloadObservable: 'ref',
Minor Changes
-
#24
16d7a26Thanks @js2me! - added default implementation forgenerateIdproperty in globalviewModelsConfig -
#24
16d7a26Thanks @js2me! -idproperty now is optional for implementation forViewModelSimpleinterfaceNow you can do not implement
ViewModelSimpleinterface to work with this library:class MyVM { bar = '1' } ... const model = useCreateViewModel(MyVM); return <div>{model.bar}</div>;
class MyVM { foo = '1'; } ... const YouComponent = withViewModel(MyVM, ({ model }) => { return <div>{model.foo}</div> });
-
#24
16d7a26Thanks @js2me! -parentViewModelproperty forViewModelSimpleinterface
Patch Changes
- #24
16d7a26Thanks @js2me! - fixed typings forParentViewModelgeneric type argument for all interfaces/classes (support AnyViewModelSimple)
Changes: 7.2.0...8.0.0