data-client

Async State Management without the Management

APACHE-2.0 License

Downloads
44.4K
Stars
1.9K
Committers
37

Bot releases are visible (Hide)

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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;
      }
    }
    
data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • b60a4a558e: Change internal organization of some types
  • Updated dependencies [b60a4a558e]
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 991c415135: Update readme
  • Updated dependencies [b60a4a558e]
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • b60a4a558e: Change internal organization of some types
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • b60a4a558e: Change internal organization of some types
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • ccaf9411c2: Support 0.4 @data-client/react
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • ccaf9411c2: Support 0.4 @data-client/react
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • ccaf9411c2: Support 0.4 @data-client/react
data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

data-client - @rest-hooks/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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]

data-client - @data-client/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 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.