-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use Map instead of plain object (#65)
* feat: use Map instead of plain object * fix: return isCached function * fix: return some base API to avoid multiple changes * fix: set cached true by default * fix: move isCached to map * feat: simplify logic for getComponentFromCache * fix: import isCached from map instead of index file * fix: do not export cache
- Loading branch information
1 parent
aa3f4d8
commit 3edb9d8
Showing
5 changed files
with
32 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
import { Component } from './interface'; | ||
|
||
type Loadable = { | ||
[key: string]: Component | ||
} | ||
|
||
export const mapLoadable: Loadable = {}; | ||
export const mapLoadable = new Map<string, Component>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters