v6.0.0
Enhancements
- feat(args): Implement generic arguments.
- Add the
Args
class which represent one or more arguments. - Add the
Args1
,Args2
andArgs3
classes which represent one, two and three arguments respectively. - Add the types
ArgsX2
andArgsX3
which representArgs2
andArgs3
with the same arguments type. - Add
ary
methods for converting Function to Function with generic arguments.
- Add the
- feat(memo): Implement the
Memo
class. It's used for memoizing values returned by a calcutate function. - feat(memo): Add
MemoInterceptors
,MemoInterceptor
andMemoInterceptorWrapper
for intercepting and handling various events during the memoization process. - feat(memo): Add
AsyncMemoSafe
for removing the memoized value if its futures that throw an error when executed. - feat(memo): Add
TemporaryCacheMemo
for removing memoized values from the cache after a specified duration. - feat(framework, widgets):Improve
ReactterInstanceManager
andReactterInstance
.- Add
ref
parameter toReactter.get
. - Add
Reactter.destory
. - Add
InstanceManageMode.builder
,InstanceManageMode.factory
andInstanceManageMode.singleton
enums. These types represent different ways of creating and managing instances. - Add
Reactter.getInstanceManageMode
method for getting the instance type of the instance specified. - Add
Reactter.isRegistered
method for check if an instance is registered in Reactter. - Add
Reactter.lazyBuilder
,Reactter.lazyFactory
,Reactter.lazySingleton
methods to register a builder function to create a new instance in one of the different types. - Add
Reactter.builder
,Reactter.factory
,Reactter.singleton
methods to create a new instance in one of the different types. - Add
type
property toReactterProvider
.
- Add
- feat(hooks): Improve
UseInstance
hook.- Add
UseInstance.register
constructor for registering the builder function when it instantiated. - Add
UseInstance.create
constructor to create an instancia when it instantiated. - Add
UseInstance.get
constructor to create and/or get an instancia when it instantiated. - Add
UseInstance.lazyBuilder
,UseInstance.lazyFactory
,UseInstance.lazySingleton
factories to register a builder function to create a new instance in one of the different types when it instantiated. - Add
UseInstance.builder
,UseInstance.factory
,UseInstance.singleton
factories to create a new instance in one of the different types when it instantiated.
- Add
Breakings
- refactor(framework): Replace
Reactter.instanceOf
toReactter.find
. - refactor(framework): Change builder parameter of
Reactter.register
andReactter.create
to positional parameter. - refactor(hooks): Add
UseAsyncState.withArg
for usingUseAsyncState
withArgs
.- Now, the
resolve
method ofUseAsyncState
is used without arguments. Replace withUseAsyncState.withArg
. Itsresolve
method allows to use arguments.
- Now, the
- refactor(hooks, example): Deprecate
UseState.initial
andUseState.reset
.- Avoid using it.
- refactor(hooks): Deprecate
UseEvent
hook.- Use event shortcuts instead.
- refactor(hooks, test): Deprecate
UseContext
hook.- Use manage instances shortcuts or
UseInstance
instead.
- Use manage instances shortcuts or
- refactor(framework): The
Reactter.unregister
couldn't deregister the instance builder when the instance is active. - refactor(framework): Rename
Reactter.dispose
toReactter.offAll
. - refactor(types): Rename
ContextBuilder
toInstanceBuilder
andInstanceBuilder
toInstanceContextBuilder
. - reactor(framework): Rename
Reactter.lazy
toReactter.lazyState
.
Internal
- refactor(framework, hooks, test): Improve code structure and how to attach an instance to states using
ReactterZone
and structure code ofReactterState
. - refactor(example): Improve examples using the new features.
- test(framework, widgets, hooks): Add some tests about
ReactterInstanceManager
,ReactterInstance
,UseInstance
- test(framework): Improve tests.
- test(framework): Add
Reactter.destroy
test. - test(memo): Add
Memo
andMemoInterceptor
test. - test(args): Add
Args
test. - test(hooks): Add
UseAsyncState.withArg
test. - test(hooks): Add
UseInstance
test. - fix(test): Fix grammar of test description.
What's Changed
- Fixed typos and improved grammar by @Kentukyyo in #1
- Pre release 6.0.0 by @CarLeonDev in #2
New Contributors
- @Kentukyyo made their first contribution in #1
- @CarLeonDev made their first contribution in #2
Full Changelog: v5.1.2...v6.0.0