Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish the SSR hook library #4

Open
amanteaux opened this issue Mar 23, 2023 · 0 comments
Open

Publish the SSR hook library #4

amanteaux opened this issue Mar 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@amanteaux
Copy link
Member

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.

@amanteaux amanteaux added the enhancement New feature or request label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant