Getting Started
What RenderJS needs and the two ways to install it (npm or CDN).
Prerequisites
- A modern browser with ES2022 support (
IntersectionObserver,navigator.clipboard,fetch) - Node.js (build/development only; no Node runtime dependency at execution time)
- No other runtime dependencies
Installation
Install via npm
npm i @pardnchiu/renderjs
Include via CDN
<!-- Version 2.0.0 and above -->
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/renderjs@[VERSION]/dist/RenderJS.js" copyright="Pardn Ltd"></script>
<!-- Version 1.x (formerly PDRenderKit) -->
<script src="https://cdn.jsdelivr.net/npm/pdrenderkit@[VERSION]/dist/PDRenderKit.js"></script>
The
RJStemplate engine requirescopyright="Pardn Ltd": without it the script tag removes itself and never sets the init flag (document.$init), soRJSonly processes text on the root node and leaves every child directive and{{ }}unrendered. Prototype extensions and chainable DOM construction work either way.
Next Steps
- Building DOM Elements: chainable DOM construction and element queries
- First RJS Template: create an
RJSinstance and update it withrenew() - Core Concepts: the
RJSinstance lifecycle and its non-reactive design - API Reference: every prototype method RenderJS adds
- Listener System: lazyload and SVG inlining internals