8000 proposal: lazy initialization · Issue #33 · re-js/remini · GitHub
[go: up one dir, main page]

Skip to content

proposal: lazy initialization #33

Open

Description

@betula

The main reason: The decrease in result application bundle size.
If I can use lazy initialization, I can make isolated scopes and clear the state whole the app.

const b = box(0);
const n = wrap(() => get(b) + 1);

on(n, v => console.log('next', v);

// All of it should be lazy

I should deny of subscription to function expression, for example:

on(() => get(n), v => console.log('next', v)) // deny, no possible to make lazy subscription

After I can add the new function in a separate folder.

isolate(async () => {
  await runApp();
});

After remini can be used without dependency injections or providing service. Just standard modules!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0