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.
Currently the SSR hook library is part of the sample project:
plume-ssr-loader.To do that, the other hooks
plume-http-react-hook-loaderandreact-hooks-aliasmust be published as well.One advantage of that is that it would be possible to add the ESlint rule
no-restricted-imports:To achieve this, a refactoring should be made in
useObservableLoaderand inuseSsrObservableLoaderto accept only one observable. This would make TS typing stronger and it would enableWithDataLoaderto 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.