Async State Management without the Management
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] about 1 year ago
8d9f6fe15c: fix: Export types needed for Resource.extend
cannot be named without a reference to '../../node_modules/@data-client/rest/lib/resourceExtensionTypes'. This is likely not portable. A type annotation is necessary.ts(2742)
a8936f5e6d: Entity.process() now gets an addition argument of 'args' (sent from endpoint)
class Stream extends Entity {
username = '';
title = '';
game = '';
currentViewers = 0;
live = false;
pk() {
return this.username;
}
static key = 'Stream';
process(value, parent, key, args) {
const processed = super.process(value, parent, key, args);
processed.username = args[0]?.username;
return processed;
}
}
Updated dependencies [8d9f6fe15c]
Updated dependencies [a8936f5e6d]
Published by github-actions[bot] about 1 year ago
a8936f5e6d: Entity.process() now gets an addition argument of 'args' (sent from endpoint)
class Stream extends Entity {
username = '';
title = '';
game = '';
currentViewers = 0;
live = false;
pk() {
return this.username;
}
static key = 'Stream';
process(value, parent, key, args) {
const processed = super.process(value, parent, key, args);
processed.username = args[0]?.username;
return processed;
}
}
Updated dependencies [a8936f5e6d]
Published by github-actions[bot] about 1 year ago
8d9f6fe15c: fix: Export types needed for Resource.extend
cannot be named without a reference to '../../node_modules/@data-client/rest/lib/resourceExtensionTypes'. This is likely not portable. A type annotation is necessary.ts(2742)
a8936f5e6d: Entity.process() now gets an addition argument of 'args' (sent from endpoint)
class Stream extends Entity {
username = '';
title = '';
game = '';
currentViewers = 0;
live = false;
pk() {
return this.username;
}
static key = 'Stream';
process(value, parent, key, args) {
const processed = super.process(value, parent, key, args);
processed.username = args[0]?.username;
return processed;
}
}
Updated dependencies [a8936f5e6d]
Published by github-actions[bot] about 1 year ago
a8936f5e6d: Entity.process() now gets an addition argument of 'args' (sent from endpoint)
class Stream extends Entity {
username = '';
title = '';
game = '';
currentViewers = 0;
live = false;
pk() {
return this.username;
}
static key = 'Stream';
process(value, parent, key, args) {
const processed = super.process(value, parent, key, args);
processed.username = args[0]?.username;
return processed;
}
}
Updated dependencies [a8936f5e6d]
Published by github-actions[bot] about 1 year ago
a8936f5e6d: Entity.process() now gets an addition argument of 'args' (sent from endpoint)
class Stream extends Entity {
username = '';
title = '';
game = '';
currentViewers = 0;
live = false;
pk() {
return this.username;
}
static key = 'Stream';
process(value, parent, key, args) {
const processed = super.process(value, parent, key, args);
processed.username = args[0]?.username;
return processed;
}
}
Published by github-actions[bot] about 1 year ago
f95dbc64d1: Collections can filter based on FormData arguments
ctrl.fetch(getPosts.push, { group: 'react' }, new FormData(e.currentTarget));
Say our FormData contained an author
field. Now that newly created
item will be properly added to the collection list for that author.
useSuspense(getPosts, {
group: 'react',
author: 'bob',
});
In this case if FormData.get('author') === 'bob'
, it will show
up in that useSuspense() call.
See more in the Collection nonFilterArgumentKeys example
Updated dependencies [f95dbc64d1]
Published by github-actions[bot] about 1 year ago
f95dbc64d1: Collections can filter based on FormData arguments
ctrl.fetch(getPosts.push, { group: 'react' }, new FormData(e.currentTarget));
Say our FormData contained an author
field. Now that newly created
item will be properly added to the collection list for that author.
useSuspense(getPosts, {
group: 'react',
author: 'bob',
});
In this case if FormData.get('author') === 'bob'
, it will show
up in that useSuspense() call.
See more in the Collection nonFilterArgumentKeys example
Updated dependencies [f95dbc64d1]
Published by github-actions[bot] about 1 year ago
f95dbc64d1: Collections can filter based on FormData arguments
ctrl.fetch(getPosts.push, { group: 'react' }, new FormData(e.currentTarget));
Say our FormData contained an author
field. Now that newly created
item will be properly added to the collection list for that author.
useSuspense(getPosts, {
group: 'react',
author: 'bob',
});
In this case if FormData.get('author') === 'bob'
, it will show
up in that useSuspense() call.
See more in the Collection nonFilterArgumentKeys example
Updated dependencies [f95dbc64d1]
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
f95dbc64d1: Collections can filter based on FormData arguments
ctrl.fetch(getPosts.push, { group: 'react' }, new FormData(e.currentTarget));
Say our FormData contained an author
field. Now that newly created
item will be properly added to the collection list for that author.
useSuspense(getPosts, {
group: 'react',
author: 'bob',
});
In this case if FormData.get('author') === 'bob'
, it will show
up in that useSuspense() call.
See more in the Collection nonFilterArgumentKeys example
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
7436b43f78: Fix Resource.extend() for builtin endpoints with zero typing options
const RatingResource = createResource({
path: '/ratings/:id',
schema: Rating,
}).extend({
getList: {
dataExpiryLength: 10 * 60 * 1000, // 10 minutes
},
});
This would previously break the types of RatingResource.getList.
This would only occur because dataExpiryLength is not a type-influencing option.
Updated dependencies [7436b43f78]
Published by github-actions[bot] about 1 year ago
7436b43f78: Fix Resource.extend() for builtin endpoints with zero typing options
const RatingResource = createResource({
path: '/ratings/:id',
schema: Rating,
}).extend({
getList: {
dataExpiryLength: 10 * 60 * 1000, // 10 minutes
},
});
This would previously break the types of RatingResource.getList.
This would only occur because dataExpiryLength is not a type-influencing option.