Skip to content

Commit

Permalink
Update to 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Mar 19, 2019
1 parent 7720ce1 commit 21d7d35
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.4.2 - 2019-03-18
- Add fallbacks for control flow
- Add new Portal Control Flow - This allows nodes to be rendered outside of the component tree with support for satelite ShadowRoots.
- Add new Suspend Control Flow - This renders content to a isolated document and display fallback content in its place until ready. Good for nested Async Data Fetching.
- Default node placeholders to comments (improved text interpolation)
- Added events binding for irregular event names

## 0.4.0 - 2019-02-16
- Rename API to create__ to be semantically correct
- Added implicit event delegation
Expand All @@ -25,7 +32,7 @@

## 0.3.0 - 2018-12-25
- New setState API inspired by Falcor paths to handle ranges.
- Reduction in API to remove State object functions and change to React-like Hooks API syntax.
- Reduction in API to remove State object functions and change to explicit methods.
- Expose reconcile method to do deep differences against immutable data sources (previously automatically done for selectors).
- Removed 'from' operators as limited usefulness with new patterns.

Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ Solid.js is yet another declarative Javascript library for creating user interfa

### Key Features:
* Real DOM with fine grained change detection (<b>No Virtual DOM! No Dirty Checking Digest Loop!</b>)
* JSX precompilation with support for standard JSX features and W3C Web Components
* Webcomponent friendly implicit event delegation
* JSX precompilation with support for standard JSX features
* Webcomponent friendly
* Implicit event delegation with Shadow DOM Retargeting
* Shadow DOM Portals
* Custom Element friendly Suspense flow
* Declarative data
* Data behavior is part of the declaration
* No need for lifecycle functions, and the large chains of conditionals they bring.
* Power of Hooks with no Hook Rules.
* Simple function Components with no need for lifecycle functions
* Power of Hooks with no Hook Rules
* ES6 Proxies to keep data access simple and POJO like
* Expandable custom operators and binding directives.
* Custom binding directives.
* Immutable interface with performance of mutability.
* Performance amongst the fastest libraries. See Solid on [JS Framework Benchmark](https://github.com/krausest/js-framework-benchmark)

Expand Down
10 changes: 6 additions & 4 deletions documentation/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ By default data is simply bound to expressions. If you wish to bind it for dynam

## Events

on_____ properties get added (addEventListener) as event handlers on the element. Camel Case events will be delegated by default and the second argument will be the model property or (nearest parent's). Use all lowercase for directly bound events.
on_____ properties get added (addEventListener) as event handlers on the element. Camel Case events will be delegated by default and the second argument will be the model property or (nearest parent's). Use all lowercase for directly bound native events.

If you need to use non-lowercase or hyphenated event names use the events binding.

## Control Flow

While you could use a map function for loops and raw ternary operators of conditionals they aren't optimized. While perhaps not as big of a deal in the VDOM since Solid is designed to not execute all the code from top down repeatedly we rely on techniques like isolated contexts and memoization. This is complicated and requires special methods. To keep things simple and optimizable the the renderer uses a special JSX tag (<$>) for control flow. Current 'each' and 'when' are supported.
While you could use a map function for loops and raw ternary operators of conditionals they aren't optimized. While perhaps not as big of a deal in the VDOM since Solid is designed to not execute all the code from top down repeatedly we rely on techniques like isolated contexts and memoization. This is complicated and requires special methods. To keep things simple and optimizable the the renderer uses a special JSX tag (<$>) for control flow. Current 'each', 'when', 'portal', and 'suspend' are supported.

```jsx
<ul>
<$ each={ state.users }>{
<$ each={ state.users } fallback={ <div>No Users</div> }>{
user => <li>
<div>{( user.firstName )}</div>
<$ when={ user.stars > 100 }>
Expand All @@ -34,7 +36,7 @@ While you could use a map function for loops and raw ternary operators of condit
</ul>
```

The library also includes a couple afterRender hooks for this element.
The library also includes a couple afterRender hooks.

### selectWhen(signal, handler)
### selectEach(signal, handler)
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solid-js",
"description": "A declarative JavaScript library for building user interfaces.",
"version": "0.4.1",
"version": "0.4.2",
"author": "Ryan Carniato",
"license": "MIT",
"repository": {
Expand All @@ -20,10 +20,10 @@
"s-js": "~0.4.9"
},
"peerDependencies": {
"babel-plugin-jsx-dom-expressions": "~0.4.8"
"babel-plugin-jsx-dom-expressions": "~0.5.0"
},
"devDependencies": {
"babel-plugin-jsx-dom-expressions": "~0.4.8",
"babel-plugin-jsx-dom-expressions": "~0.5.0",
"coveralls": "^3.0.3",
"jest": "~24.5.0",
"rollup": "^1.6.0",
Expand Down

0 comments on commit 21d7d35

Please sign in to comment.