Géry Debongnie
c62c3fea19
[FIX] types: improve type of useExternalListener
...
so it can work on window
closes #613
2020-01-21 08:11:40 +01:00
Géry Debongnie
54f5819ef9
[ADD] hooks: add useExternalListener hook
...
It is very useful.
Also, this commit prettifies the code.
closes #608
2020-01-09 14:06:30 +01:00
Géry Debongnie
56087b95cd
[REF] observer: notify subscribers directly
...
This rev. moves the logic of batching the notifications of changes
occurring in the same microtask tick, from the observer, to the
listeners (the context, and the render function of components).
By doing so in render, we ensure that similar renderings are
batched in a single one, wherever they come from (state change,
store change, direct call...).
2019-11-14 15:12:31 +01:00
Aaron Bohy
e5940b4b6b
[FIX] component: concurrent calls to mount and render
...
Closes #450
2019-11-14 15:12:31 +01:00
Aaron Bohy
7e721a96b5
[IMP] hooks: useRef on component: set el anyway
...
Closes #437
2019-11-06 17:06:37 +01:00
Géry Debongnie
1337aa0107
[IMP] component: add current key for easier hook creation
...
closes #319
2019-10-14 10:25:34 +02:00
Géry Debongnie
07dac970f7
[IMP[ component/hooks: add onWillStart and onWillUpdateProps
2019-10-09 15:09:26 +02:00
Aaron Bohy
17ce73e6a9
[REF] hooks: improve makeLifecycleHook
2019-10-08 15:52:44 +02:00
Géry Debongnie
c3453d35b9
[IMP] hooks/component: remove updateEnv, add useSubEnv
...
closes #182
2019-10-04 22:54:27 +02:00
Géry Debongnie
022b29b6a0
[IMP] component/qweb: remove t-mounted directive
...
The t-mounted directive main goals can be achieved with hooks, in a
better and more intuitive way.
closes #308
2019-10-03 10:57:24 +02:00
Géry Debongnie
367725d194
[IMP] hooks: add onWillPatch and onPatched
...
This commit also changes the behaviour of willPatch and patched: they no
longer transfer data from one to the other, because it can be done
cleanly by hooks and a closure.
closes #307
2019-10-03 10:20:28 +02:00
Géry Debongnie
f6820bb8ac
[REF] hooks: better implementation of onMounted/onWillUnmount
2019-09-28 21:14:40 +02:00
Géry Debongnie
5cdaa7b473
[IMP] hooks: implement useRef hook
...
closes #194
2019-09-27 11:20:08 +02:00
Géry Debongnie
5335fb8fba
[IMP] components: add hooks mechanism
...
part of #194
2019-09-27 11:20:08 +02:00