Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
immutable-core-component
Advanced tools
Immutable Core Component provides the server side functionality for Immutable App Component. Together they provide a framework for dynamic UI components that integrate with the Immutable App ecosystem.
When using Immutable App, Immutable Core Components will be instantiated automatically from the files in the component directory. The examples here use Immutable Core Component directly. See the Immutable App Component documentation for usage examples with an app.
var component = new ImmutableCoreComponent({
name: 'foo',
server: {
get: function (args) {}
new: function (args) {},
set: function (args) {},
},
})
This example will create a new
Immutable Core module named
fooComponent
with get
, new
and set
methods.
The arguments for server
will be taken from the foo.server.js
file when used
with Immutable App Component.
var component = new ImmutableCoreComponent({
client: {
binds: { 'element-id', 'data.property' },
minify: true,
placeholders: { foo: 'foo', 'foo.bar', 'bar' },
preRender: function (args) { .... }
}
})
The arguments for client
will be taken from the foo.client.js
file when used
with Immutable App Component.
name | type | description |
---|---|---|
binds | object | map of ids and data properties to bind |
minify | boolean | minify js sent to client |
placeholders | object | map of data properties and placeholder values |
refreshInterval | integer | time in ms between refresh of client data |
------------------- | ----------- | ---------------------------------------------- |
preBind | function | hook that executes before bind |
preGet | function | hook that executes before get |
preRefresh | function | hook that executes before refresh |
preRender | function | hook that executes before render |
preSet | function | hook that executes before set |
postBind | function | hook that executes after bind |
postGet | function | hook that executes after get |
postRefresh | function | hook that executes after refresh |
postRender | function | hook that executes after render |
postSet | function | hook that executes after set |
var component = new ImmutableCoreComponent({
css: '.foo { display: block }',
helpers: { bar: function () {...} },
js: 'console.log("foo")',
partials: { bam: 'Goodbye {{foo}}' },
template: 'Hello {{foo}}',
})
When using Immutable App Component:
css
property comes from foo.css
helpers
object is populated from the helpers
directoryjs
property comes from foo.js
partials
object is populated from the partials
directorytemplate
property comes from foo.hbs
name | type | description |
---|---|---|
css | string | css to include on page - will be wrapped in |
helpers | object | map of handlebars helper names and functions |
js | string | js to include - will be wrapped in anonymous function |
partials | object | map of hadlebars partials names and template strings |
template | string | main handlebars template string |
FAQs
Dynamic UI components for Immutable App
We found that immutable-core-component 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.