Skip to content

Publish the SSR hook library #4

@amanteaux

Description

@amanteaux

Currently the SSR hook library is part of the sample project: plume-ssr-loader.

To do that, the other hooks plume-http-react-hook-loader and react-hooks-alias must be published as well.

One advantage of that is that it would be possible to add the ESlint rule no-restricted-imports:

{
  name: 'plume-http-react-hook-loader',
  importNames: ['useObservableLoader'],
  message: 'Please use the useSsrObservableLoader version instead.'
}

To achieve this, a refactoring should be made in useObservableLoader and in useSsrObservableLoader to accept only one observable. This would make TS typing stronger and it would enable WithDataLoader to accept an array of loaders: this would facilitate to implements complex use cases where for example of loader should not be used if another is already resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions