Async State Management without the Management
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] 2 months ago
Published by github-actions[bot] 2 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Updated dependencies [bad1fb9
]:
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Updated dependencies [3fa9eb9
]:
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Updated dependencies [3fa9eb9
]:
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Updated dependencies [3fa9eb9
]:
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Published by github-actions[bot] 3 months ago
#3165 3fa9eb9
Thanks @ntucker! - Query can take Object Schemas
This enables joining arbitrary objects (whose pk works with the same arguments.)
class Ticker extends Entity {
product_id = '';
price = 0;
pk(): string {
return this.product_id;
}
}
class Stats extends Entity {
product_id = '';
last = 0;
pk(): string {
return this.product_id;
}
}
const queryPrice = new schema.Query(
{ ticker: Ticker, stats: Stats },
({ ticker, stats }) => ticker?.price ?? stats?.last,
);
Updated dependencies [3fa9eb9
]:
Published by github-actions[bot] 3 months ago
262587c
Thanks @ntucker! - export EntityInterface, Queryable
#3164 ffea6fc
Thanks @ntucker! - Manager.getMiddleware() -> Manager.middleware
getMiddleware()
is still supported to make this change non-breaking
#3164 ffea6fc
Thanks @ntucker! - Move manager lifecycle logic from DataStore to DataProvider
This has no behavioral change, but creates a better seperation of concerns.
82fbb85
Thanks @ntucker! - Middleware types include union of possible actions
8287f48
Thanks @ntucker! - README: Update manager stream example link
Updated dependencies [ffea6fc
, 82fbb85
, 262587c
]:
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
Updated dependencies [0adad92
]:
Published by github-actions[bot] 3 months ago
#3161 b932dca
Thanks @ntucker! - Add jsdocs to IdlingNetworkManager
e4751d9
Thanks @ntucker! - NetworkManager constructor uses keyword args
new NetworkManager(42, 7);
new NetworkManager({ dataExpiryLength: 42, errorExpiryLength: 7 });
09ad848
Thanks @ntucker! - state.endpoints moved above indexes
entites
and endpoints
are the most commonly inspected
parts of state when debugging, so it is better to have endpoints
above indexes.
#3161 b932dca
Thanks @ntucker! - Add configuration to getDefaultManagers()
// completely remove DevToolsManager
const managers = getDefaultManagers({ devToolsManager: null });
// easier configuration
const managers = getDefaultManagers({
devToolsManager: {
// double latency to help with high frequency updates
latency: 1000,
// skip websocket updates as these are too spammy
predicate: (state, action) =>
action.type !== actionTypes.SET_TYPE || action.schema !== Ticker,
},
});
// passing instance allows us to use custom classes as well
const managers = getDefaultManagers({
networkManager: new CustomNetworkManager(),
});
Updated dependencies [b932dca
, e4751d9
, 09ad848
]:
Published by github-actions[bot] 3 months ago
Updated dependencies [0adad92
]:
Published by github-actions[bot] 3 months ago
Published by github-actions[bot] 3 months ago
#3161 b932dca
Thanks @ntucker! - Add jsdocs to IdlingNetworkManager
e4751d9
Thanks @ntucker! - NetworkManager constructor uses keyword args
new NetworkManager(42, 7);
new NetworkManager({ dataExpiryLength: 42, errorExpiryLength: 7 });
09ad848
Thanks @ntucker! - state.endpoints moved above indexes
entites
and endpoints
are the most commonly inspected
parts of state when debugging, so it is better to have endpoints
above indexes.