Skip to content

proposal: lazy initialization #33

@betula

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!

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