Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
This is a beta-stage component-based JavaScript library for single-page applications and an example application.
npm install rotorjs
(Note: Node JS 14+ as an ECMAScript 2015+ & ESM-compatible environment is required.)
RotorJS provides classes which represent an application and its components.
It uses exchangeble "middlewares" under the hood. A middleware consist of a model class, a rendering loop class and (possible) other classes. You can use your own middlewares so RotorJS is DOM-agnostic, model-agnostic, etc.
A component is a subclass of RotorJS class, it has to provide a render function. Component's state (model) is available during render. Components may also have their activating and deactivating hooks. Subcomponents are supported.
Application is also a subclass of a RotorJS class. You may implement application's start and stop hooks but default start hook receives a root component.
A target object (e.g. DOM tree) is available after application has been started. It is changed during some component's state updating. So target is "current view" of application.
Some additional features are also provided.
Default middleware is based on Freezer and Snabbdom. So your application uses unidirectional dataflow, immutable state and provides DOM target with default middleware.
You simple have to append application's target to your document's body and use Snabbdom's helpers to construct component's view. See example for more information.
TODO
See https://github.com/kuraga/rotorjs/tree/master/example.
npm run test-browser
open test/browser/testBrowser.html
# read browser's console
npm run test-browser-clean
Alexander Kurakin <kuraga333@mail.ru>
https://github.com/kuraga/rotorjs/issues
MIT
FAQs
Component-based JavaScript library for single-page applications.
The npm package rotorjs receives a total of 4 weekly downloads. As such, rotorjs popularity was classified as not popular.
We found that rotorjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.