-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.txt
75 lines (52 loc) · 2.11 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Agora === https://github.com/postaljs/postal.js
- router (https://medium.freecodecamp.com/you-might-not-need-react-router-38673620f3d#.l8wdwylds)
- data load (https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.i32e10wnk)
and container
.on('blur keyup paste input', ...)
Question : how to make .model(...) and .collectionModel(...)
each call on view to modify state check if it give change : if yes : just set flag 'stateHasChanged' on view
make shallow-copy of state on requestAnimationFrame and if "stateHasChanged"
# In-place declarations
on tag :
- transition (mount avec transitionIn and Out)
- bindTransitionOnParent with delay
on view :
- load : need AsyncAgregator in env
- route
.classes('bloupi foo bar')
==> no diffing, not "dynamic" OK
si on remove recursivement : OK
parcours de l'arbre retiré
- recursion uniquement que sur compounds or component
- + tag + if + each + route + ifPostal
- après premier niveau on ne remove plus les tags de leur parent
- + on nie just les feuilles
KEYED EACH : Almost OK
keyedEach(collection, key, () => {})
==> at creation : create dico with key:rendered
=> at dif :
forEach items[i] : look in oldDico
// dif then displace : displace mean reinserting child (tag(s)) at current index
const key = item[keyName], oldRendered = oldDsico[key], newRendered = handler(item);
children.push(newRendered);
if(oldRendered){
dif($tag, newRendered, oldRendered, scopes);
if(i !== oldRendered.index)
reinsert($tag, newRendered, lastChild(lastRendered)); // (displace tags after last rendered)
// reorder oldChildren by swapping for catching notSeen
if(seenIndex !== oldRendered.index){
const temp = oldChildren[seenIndex];
oldChildren[seenIndex] = oldChildren[oldRendered.index];
oldChildren[oldRendered.index] = temp;
}
seenIndex++;
}
else // ! found
if(i >= oldChildren.length)
render($tag, newRendered, scopes, frag);
else
// render in fragment then insertBefore lastRendered.nextSibling
lastRendered = newRendered;
newDico[key] = newRendered;
newRendered.index = currenIndex
remove from i to end of oldChildren