Skip to content

Commit 41959cd

Browse files
committed
Add attributions
1 parent 7efdeea commit 41959cd

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/autotrackMemoize/autotracking.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Original autotracking implementation source:
2+
// - https://gist.github.com/pzuraq/79bf862e0f8cd9521b79c4b6eccdc4f9
3+
// Additional references:
4+
// - https://www.pzuraq.com/blog/how-autotracking-works
5+
// - https://v5.chriskrycho.com/journal/autotracking-elegant-dx-via-cutting-edge-cs/
16
import { assert } from './utils'
27

38
// The global revision clock. Every time state changes, the clock increments.

src/autotrackMemoize/proxy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Original source:
2+
// - https://github.com/simonihmig/tracked-redux/blob/master/packages/tracked-redux/src/-private/proxy.ts
3+
14
import {
25
consumeCollection,
36
dirtyCollection,

src/weakMapMemoize.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Original source:
2+
// - https://github.com/facebook/react/blob/0b974418c9a56f6c560298560265dcf4b65784bc/packages/react/src/ReactCache.js
3+
14
const UNTERMINATED = 0
25
const TERMINATED = 1
36

@@ -31,7 +34,6 @@ export function weakMapMemoize<F extends (...args: any[]) => any>(func: F) {
3134

3235
let fnNode = createCacheNode()
3336

34-
// console.log('Creating memoized function')
3537
function memoized() {
3638
let cacheNode = fnNode
3739

0 commit comments

Comments
 (0)