Skip to content

Releases: Andrei15193/react-model-view-viewmodel

2.2.0

22 Oct 17:06
Compare
Choose a tag to compare

This is more or less a consolidation release. After using the library for a while and encountering different scenarios I have come to the conclusion that some adjustments need to be made to improve it.

Hook Naming and Unification

With this release I am unifying the view model related hooks under useViewModel for useViewModelType and watchViewModel, while useViewModelFactory is renamed to useViewModelMemo.

The existing hooks will still work, they have been marked as deprecated and their implementations are now based on the new ones.

For more information, check the wiki.

With this release, all hooks will follow the proper naming conventions, the ones that do not have been marked as deprecated and will be removed with the next major release. For more information see Reusing Logic with Custom Hooks - Hook names always start with use.

Form Field Flag Deprecations

The .isFocused and .isTouched flags have been marked as deprecated. The former is not exactly a UI logic concern, but rather a purely UI presentation concern, the components handle the focus state of the inputs, not the view model. The latter was removed as not all forms may need this and can easily be added back, along side any other desired properties, though form extensibility.

Form Extensibility

Forms have been updated to allow easier extensibility, the base types are still available, however it is easier to have custom fields and reuse/extend the form field collection type.

Fields follow the config-style approach for constructors allowing for instances to be created and have their properties set in one go. This works well with subclasses as the base config interface can be extended to include more fields.

Tutorials

The tutorials are covered as GitHub Discussions as this allows for easier maintenance and long-term support. People can add comments and react. The ToDo list tutorial will be retired along with the repository for it, the tutorials can be run on CodeSandbox.

For more information check the Guides and Tutorials category.

2.2.0-rc.3

14 Sep 20:37
Compare
Choose a tag to compare
2.2.0-rc.3 Pre-release
Pre-release

Bug Fixes

2.2.0-rc.2

08 Sep 20:24
Compare
Choose a tag to compare
2.2.0-rc.2 Pre-release
Pre-release

Bug Fixes

  • Fixed useViewModel when changing the instance without unmounting the component.

2.2.0-rc.1

03 Sep 19:20
Compare
Choose a tag to compare
2.2.0-rc.1 Pre-release
Pre-release

This is more or less a consolidation release. After using the library for a while and encountering different scenarios I have come to the conclusion that some adjustments need to be made to improve it.

Hook Naming and Unification

With this release I am unifying the view model related hooks under a single useViewModel one. The useViewModelType, useViewModelFactory, and watchViewModel hooks have been marked as deprecated and their implementation is now based on the useViewModel one. They will continue to function the exact same way, however they will be removed with the next major release.

The new useViewModel hook has 3 overloads, we can now specify deps and constructor arguments (which also act as deps), for more info see the documentation.

All hooks will follow the proper naming conventions, the ones that do not follow the conventions have been marked as deprecated and will be removed with the next major release. For more information see Reusing Logic with Custom Hooks - Hook names always start with use.

Form Field Flag Deprecations

The .isFocused and .isTouched flags have been marked as deprecated. The former is not exactly a UI logic concern, but rather a purely UI presentation concern, the components handle the focus state of the inputs, not the view model. The latter was removed as not all forms may need this and can easily be added back, along side any other desired properties, though form extensibility.

Form Extensibility

Forms have been updated to allow easier extensibility, the base types are still available, however it is easier to have custom fields and reuse/extend the form field collection type.

For more information around the reasoning around these decisions see the Discussions / React MVVM@2.2.0 announcement.

2.1.0

27 May 19:23
Compare
Choose a tag to compare

2.0.1

20 Jun 09:50
Compare
Choose a tag to compare

Release Notes

  • GH-2 Fixed observable collection reduce methods

2.0.0

18 Jun 13:46
Compare
Choose a tag to compare

New Features

  • Added ReadOnlyObservableCollection and ObservableCollection classes

Breaking Changes

  • Removed observableCollection function in favour of new classes
  • Added itemAdded and itemRemoved events to INotifyCollectionChanged<TItem> interface

2.0.0-beta.1

05 Jun 09:23
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release

New Features

  • Added ReadOnlyObservableCollection and ObservableCollection classes

Breaking Changes

  • Removed observableCollection function in favour of new classes
  • Added itemAdded and itemRemoved events to INotifyCollectionChanged<TItem> interface

1.0.0

04 Jul 13:18
Compare
Choose a tag to compare

A library for developing React applications using Model-View-ViewModel inspired by .NET.

The Model-View-ViewModel architectural pattern is a viable alternative to the Flux architectural pattern, it does not have the same issues Flux has, but knowing and understanding the Flux principles can increase the quality of code written using MVVM.

This release includes a wide range of tools for implementing applications using MVVM as well as a simple, yet effective event system inspired by the one in .NET. Base implementations of core interfaces and features (ViewModel, FormFieldViewModel<TValue>, FormFieldCollectionViewModel and DispatchEvent<TEventArgs>) as well as an observable collection that extends the read-only array interface, observableCollection<TItem>.

The library provides a wide range of custom React hooks to make development easier. The project wiki contains the entire list as well as API documentation, a tutorials list as well as project motivation and overview.

1.0.0-beta6

19 Jun 11:30
Compare
Choose a tag to compare
1.0.0-beta6 Pre-release
Pre-release

A library for developing React applications using Model-View-ViewModel inspired by .NET.

This is a preparation release to test integration with other applications from the npm repository as a package dependency. While the library is unit tested extensively, the usage in different application will serve as additional testing. The testing application used for this purpose is HintKeep, refer to the related project for more information and usage.

For more information about the package see the wiki.