Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solid-js

Package Overview
Dependencies
Maintainers
1
Versions
463
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-js - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

2

dist/solid.js

@@ -179,3 +179,3 @@ import S from 's-js';

if (j !== undefined && j !== -1) {
temp[j] = mapped[i];
temp[j] = previous[i];
j = newIndicesNext[j];

@@ -182,0 +182,0 @@ newIndices.set(keyVal, j);

@@ -78,2 +78,22 @@ # Signals

### Composition
State and Signals combine wonderfully as wrapping a state selector in a function instantly makes it reactive accessor. They encourage composing more sophisticated patterns to fit developer need.
```js
// deep reconciled immutable reducer
const useReducer = (reducer, init) => {
const [state, setState] = useState(init),
[getAction, dispatch] = useSignal();
useEffect((prevState = init) => {
let action, next;
if (!(action = getAction())) return prevState;
next = reducer(prevState, action);
setState(reconcile(next));
return next;
})
return [state, dispatch];
}
```
### Observable

@@ -80,0 +100,0 @@

@@ -37,3 +37,3 @@ # State

{
mode: 'force' // type of comparison - default: 'default'
mode: 'force', // type of comparison - default: 'default'
key: '_id' // does a keyed comparison on arrays with key - default: 'id'

@@ -40,0 +40,0 @@ }

@@ -185,3 +185,3 @@ 'use strict';

if (j !== undefined && j !== -1) {
temp[j] = mapped[i];
temp[j] = previous[i];
j = newIndicesNext[j];

@@ -188,0 +188,0 @@ newIndices.set(keyVal, j);

{
"name": "solid-js",
"description": "A declarative JavaScript library for building user interfaces.",
"version": "0.3.5",
"version": "0.3.6",
"author": "Ryan Carniato",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -192,4 +192,6 @@ # Solid.js

* [Simple Todos](https://codepen.io/ryansolid/pen/ZqLoxo?editors=1000) on CodePen
* [TodoMVC](https://github.com/ryansolid/solid-todomvc)
* [JS Framework Benchmark](https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed/solid)
* [TodoMVC](https://github.com/ryansolid/solid-todomvc) Classic TodoMVC example
* [WebComponent Todos](https://github.com/shprink/web-components-todo/tree/master/solid) Showing off Solid with Web Components
* [JS Framework Benchmark](https://github.com/krausest/js-framework-benchmark/tree/master/frameworks/keyed/solid) The one and only
* [DBMon Benchmark](https://github.com/ryansolid/solid-dbmon) A benchmark testing ability of libraries to render unoptimized data.

@@ -196,0 +198,0 @@ ## Related Projects

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc