Skip to content

Commit

Permalink
Upgarde package name and repo
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-dldc committed Jun 29, 2023
1 parent 354a3b4 commit 61eecc3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "democrat",
"name": "@dldc/democrat",
"version": "4.0.0-9",
"description": "React, but for state management !",
"keywords": [],
"homepage": "https://github.com/etienne-dldc/democrat#readme",
"homepage": "https://github.com/dldc-packages/democrat#readme",
"bugs": {
"url": "https://github.com/etienne-dldc/democrat/issues"
"url": "https://github.com/dldc-packages/democrat/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/etienne-dldc/democrat.git"
"url": "git+https://github.com/dldc-packages/democrat.git"
},
"license": "MIT",
"author": "Etienne Dldc <e.deladonchamps@gmail.com>",
Expand Down Expand Up @@ -39,7 +39,7 @@
"typecheck:watch": "tsc --watch"
},
"dependencies": {
"suub": "^3.2.1"
"@dldc/pubsub": "^5.1.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
Expand Down
20 changes: 13 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions src/Store.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { Subscription, Unsubscribe } from 'suub';
import { Suub, Unsubscribe } from '@dldc/pubsub';
import { ChildrenUtils } from './ChildrenUtils';
import { setCurrentRootInstance } from './Global';
import { globalSetTimeout, globalClearTimeout, createRootTreeElement, createElement } from './utils';
import * as Hooks from './Hooks';
import { useChildren } from './Hooks';
import { DEMOCRAT_COMPONENT, DEMOCRAT_ELEMENT, DEMOCRAT_ROOT } from './symbols';
import {
OnIdleExec,
Children,
ResolveType,
DemocratRootElement,
TreeElement,
Factory,
FunctionComponent,
GenericFactory,
Key,
OnIdleExec,
Patch,
Patches,
ResolveType,
Snapshot,
FunctionComponent,
Factory,
Key,
GenericFactory,
TreeElement,
} from './types';
import { DEMOCRAT_COMPONENT, DEMOCRAT_ELEMENT, DEMOCRAT_ROOT } from './symbols';
import * as Hooks from './Hooks';
import { useChildren } from './Hooks';
import { createElement, createRootTreeElement, globalClearTimeout, globalSetTimeout } from './utils';

export { isValidElement, createContext, createElement } from './utils';
export { createContext, createElement, isValidElement } from './utils';

export interface Store<S> {
render: <C extends Children>(rootChildren: C) => void;
Expand Down Expand Up @@ -75,8 +75,8 @@ export function createStore<C extends Children>(
): Store<ResolveType<C>> {
const { ReactInstance = null, passiveMode = false, snapshot } = options;

const stateSub = Subscription();
const patchesSub = Subscription<Patches>();
const stateSub = Suub.createVoidSubscription();
const patchesSub = Suub.createSubscription<Patches>();

let state: ResolveType<C>;
let destroyed: boolean = false;
Expand Down

0 comments on commit 61eecc3

Please sign in to comment.