vfunc.js

FAQ

Can vfunc.js replace React or Vue?

For most business screens, behaviour on published pages, intranet systems and small SPAs it is enough. For screens that update thousands of rows often, large apps built by big teams, or when you need a rich ecosystem, React or Vue may fit better. See Compare.

What are the limits?

How slow are large lists?

The operations of js-framework-benchmark, measured four ways. Naive: one component redraws the whole screen. Recommended: as the kit teaches, only the <tbody> is redrawn, and selecting a row changes an attribute without a render. vfList: the recommended page with the official list plugin, which draws and moves only the changed rows. Vanilla: hand-written code that touches only the changed rows. The numbers are the time from the click to the end of style and layout after the render; in parentheses, the ratio to vanilla.

chromium 153.0.8010.12 · Windows_NT 10.0.26200 (win32), Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, vfunc 1.1.0, 1000 rows, median of 10 runs after 5 warm-up runs (ms)

Operation (ms)vfunc naivevfunc recommendedvfunc + vfListvanilla
create rows51.8 (1.1×)56.6 (1.2×)51.9 (1.1×)45.8
create many rows533.6 (0.9×)692.0 (1.2×)605.6 (1.1×)570.2
append rows124.8 (2.3×)109.1 (2.0×)70.6 (1.3×)54.0
partial update53.8 (3.0×)56.2 (3.1×)25.3 (1.4×)18.0
select row53.1 (265.5×)0.3 (1.5×)5.3 (26.5×)0.2
swap rows56.1 (9.7×)54.6 (9.4×)6.9 (1.2×)5.8
remove row52.8 (9.1×)55.9 (9.6×)6.7 (1.2×)5.8
clear rows6.7 (1.1×)6.0 (1.0×)5.8 (0.9×)6.2
startup68.279.082.269.6
memory (after create)1.3 MB1.3 MB1.4 MB1.4 MB
script size (gzip)10.39 KB10.52 KB12.20 KB1.26 KB

Firefox and WebKit results, min and max

What about server rendering and SEO?

vfunc assumes the HTML already exists. When a server (or static files) produces the HTML and vfunc only adds behaviour, search engines read that HTML. This site is built that way.

How is security handled?

If you find a security issue, follow SECURITY.md in the repository instead of opening a public issue.

Can I use TypeScript?

Type declarations (types/vfunc.d.ts) ship with the package. Plain scripts without a build get editor type checking with // @ts-check and a reference to types/global.d.ts.

Which browsers are supported?

BuildBrowsers
vfunc.min.js, ESMCurrent Chrome, Edge, Firefox and Safari (desktop and mobile)
vfunc.legacy.min.jsInternet Explorer 11, Edge IE mode

The examples, the starter and this site are tested automatically in Chromium, Firefox and WebKit on every change.

Is IE11 supported?

vfunc.legacy.min.js runs in IE11 and Edge IE mode; your app code must be ES5 as well. See Extensions, plugins, IE.

What is the license?

Apache-2.0. The distributed files contain no third-party code; the tools and the libraries used by examples are all listed under Licenses.