Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@amagaki/amagaki-engine-preact
Advanced tools
[![NPM Version][npm-image]][npm-url] [![TypeScript Style Guide][gts-image]][gts-url]
An Amagaki plugin for using Preact (TSX) for template rendering. Supports server-side rendering (SSR) and (optionally) hydration.
This engine can be used to bring React into an Amagaki project with minimal overhead, and you can choose whether to also use it on your site's frontend. Page modules can be created entirely using React components (via Preact) and integrate seamlessly with frontend components also built in React.
@amagaki/amagaki-plugin-page-builder
.npm install --save \
@amagaki/amagaki-engine-preact \
@amagaki/amagaki-plugin-page-builder
amagaki.ts
.import {PageBuilder} from '@amagaki/amagaki-plugin-page-builder';
import {Pod} from '@amagaki/amagaki';
import {PreactEnginePlugin} from '../src';
export default (pod: Pod) => {
PreactEnginePlugin.register(pod);
PageBuilder.register(pod, {
partialPaths: {
css: ['/dist/css/${partial.partial}/${partial.partial}.css'],
js: ['/dist/js/partials/${partial.partial}/${partial.partial}.js'],
view: ['/src/partials/${partial.partial}/${partial.partial}.tsx'],
},
});
};
If your partial requires hydration:
a. Add to your frontend's main.tsx
.
import {PartialHydrator} from '@amagaki/amagaki-engine-preact';
// Import all partials that require hydration.
import Hero from './partials/Hero';
PartialHydrator.register({
components: {
'Hero': Hero,
},
});
b. Ensure includeContext: true
is supplied in YAML files for any partial
that requires hydration.
partials:
- partial: Hero
includeContext: true
headline: Hello World!
FAQs
[![NPM Version][npm-image]][npm-url] [![TypeScript Style Guide][gts-image]][gts-url]
The npm package @amagaki/amagaki-engine-preact receives a total of 384 weekly downloads. As such, @amagaki/amagaki-engine-preact popularity was classified as not popular.
We found that @amagaki/amagaki-engine-preact demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.