
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
lit with pure functions.
npm install pure-lit
or add it to your page as module like this:
<script type="module" src="https://unpkg.com/pure-lit@latest?module"></script>
The quickest way of getting started is by using JavaScript modules.
Create a file index.html that looks like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Awesome pure-lit</title>
<script type="module">
import { html } from "https://unpkg.com/lit@latest?module";
import { pureLit } from "https://unpkg.com/pure-lit@latest?module";
pureLit(
"hello-you",
async ({ who }) => {
return html`<div>Hello ${who}!</div>`;
},
{
defaults: { who: "" },
}
);
</script>
</head>
<body>
<hello-you who="me"></hello-you>
</body>
</html>
Open it in the browser. Done.
pureLit exports the hooks from lit-element-state-decoupler and lit-element-effect which you can use to manage your state inside the functional components.
You can import them via
import { pureLit, useState, useReducer, useWorkflow, useEffect, useOnce } from "pure-lit";
and then use them like this:
pureLit("hello-world", (element) => {
const counter = useState(element, 0);
return html`<button @click="${() => counter.set(counter.get() + 1)}">You clicked me ${counter.get()} times!</button>`
});
FAQs
lit elements as functions
The npm package pure-lit receives a total of 54 weekly downloads. As such, pure-lit popularity was classified as not popular.
We found that pure-lit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.