Skip to content

Commit

Permalink
update to 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSergey committed Oct 8, 2023
1 parent 4da0707 commit 6dac67f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/babel-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@issr/babel-plugin",
"version": "2.1.0",
"version": "2.2.0",
"private": false,
"description": "Babel plugin for iSSR",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@issr/core",
"version": "2.1.0",
"version": "2.2.0",
"private": false,
"description": "iSSR the easiest way to move your React application to Server Side Rendering",
"keywords": [
Expand Down
11 changes: 0 additions & 11 deletions packages/core/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ export const useSsrState = <S>(initialState: S | (() => S), id?: string): [S, Di
return [state, modifiedSetState];
};

export const useSsrEffect2 = (effect: EffectCallback, deps?: DependencyList | string, id?: string): void => {
// eslint-disable-next-line no-nested-ternary
const effectId = Array.isArray(deps) ? id : typeof deps === 'string' ? deps : false;

if (typeof effectId !== 'string') {
throw new Error(
'"useSsrEffect" hook: id is not a string. iSSR required @issr/babel-loader. You can follow official documentation to setup your build system https://github.com/AlexSergey/issr#usage',
);
}
};

export const useSsrEffect = (effect: EffectCallback, deps?: DependencyList | string, id?: string): void => {
// eslint-disable-next-line no-nested-ternary
const effectId = Array.isArray(deps) ? id : typeof deps === 'string' ? deps : false;
Expand Down

0 comments on commit 6dac67f

Please sign in to comment.