@avine/rx-data-store
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "@avine/rx-data-store", | ||
"description": "From data source to reactive data store.", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -79,4 +79,4 @@ # rx-data-store | ||
// const dataSource = () => this.userApiService.get(); | ||
// const dataStore = new RxDataStore(dataSource); | ||
super(() => this.userApiService.get()); | ||
// const dataStore = new RxDataStore(dataSource, []); | ||
super(() => this.userApiService.get(), []); | ||
} | ||
@@ -89,3 +89,3 @@ } | ||
}) | ||
export class AppComponent implements OnInit { | ||
export class AppComponent { | ||
// The observable `data$` is an instance property of the class `RxDataStore`. | ||
@@ -95,7 +95,2 @@ user$ = this.userService.data$; | ||
constructor(private userService: UserService) {} | ||
ngOnInit() { | ||
// `fetch` is an instance method of the class `RxDataStore`. | ||
this.userService.fetch(); | ||
} | ||
} | ||
@@ -110,3 +105,3 @@ ``` | ||
export class UserService { | ||
store = new RxDataStore<User>(() => this.userApiService.get()); | ||
store = new RxDataStore<User>(() => this.userApiService.get(), []); | ||
@@ -284,3 +279,3 @@ constructor(private userApiService: UserApiService) {} | ||
dataStore.fetch(1); // Gettting data from the data store cache | ||
dataStore.fetch(1); // Getting data from the data store cache | ||
``` | ||
@@ -287,0 +282,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100645
291