You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Changelog
2
2
3
+
## 0.5.0 - 2019-04-14
4
+
- Add support for multiple renderers (JSX, Tagged Template Literals, HyperScript). Added direct imports or 'solid-js/dom' alternatives 'solid-js/html' and 'solid-js/h'.
5
+
- Reorganized dependencies work.
6
+
3
7
## 0.4.2 - 2019-03-18
4
8
- Add fallbacks for control flow
5
9
- Add new Portal Control Flow - This allows nodes to be rendered outside of the component tree with support for satelite ShadowRoots.
You can also run Solid from the browser directly with your flavor of renderer found in the [Solid Standalone](https://github.com/ryansolid/solid-standalone) package.
51
+
50
52
## Solid State
51
53
52
54
It all starts with State. State objects are immutable so to update you call their companion setter function. Through the use of proxies they give the control of an immutable interface and the performance of a mutable one. Note only Plain Objects and Arrays are deeply wrapped.
To accomplish rendering we use JSX for templating that gets compiled to native DOM element instructions. To do that we take advantage of the [Babel Plugin JSX DOM Expressions](https://github.com/ryansolid/babel-plugin-jsx-dom-expressions) which while converting JSX to DOM element instructions wraps expressions to be wrapped in our computations when indicated by in inner parens `{( )}`.
117
-
118
-
JSX as a templating language brings a lot of benefits. The just being javascript goes beyond just not needing a DSL, but setting up closure based context instead of creating context objects. This is more transparent and easier to follow and debug.
118
+
Solid's rendering is done by the [DOM Expressions](https://github.com/ryansolid/dom-expressions) library. This library provides a generic optimized runtime for fine grained libraries like Solid with the opportunity to use a number of different Rendering APIs. The best option is to use JSX pre-compilation with [Babel Plugin JSX DOM Expressions](https://github.com/ryansolid/babel-plugin-jsx-dom-expressions) to give the smallest code size, cleanest syntax, and most performant code. The compiler converts JSX to native DOM element instructions and wraps expressions to be wrapped in our computations when indicated by in inner parens `{( )}`.
119
119
120
120
To get setup add this babel plugin config to your .babelrc, webpack, or rollup config:
121
121
@@ -129,12 +129,14 @@ And include at the top of your files:
129
129
import { r } from'solid-js/dom'
130
130
```
131
131
132
-
Or, if you prefer you can use HyperScript. It does come at signifigant performance hit, as it doesn't benefit from any of the compile time optimizations that set Solid apart in performance. But it is an option for those who want to avoid Babel or do not wish to use JSX. Even though it is much slower it is still in the performance category of most popular frameworks. There are some minor differences from how you would write typical HyperScript as you need to manually wrap expressions in functions to make them observable. More information available at [Dom Expressions](https://github.com/ryansolid/dom-expressions). Include Solid HyperScript by:
132
+
Alternatively in non-compiled environments you can use Tagged Template Literals [Lit DOM Expressions](https://github.com/ryansolid/lit-dom-expressions)or even HyperScript with [Hyper DOM Expressions](https://github.com/ryansolid/hyper-dom-expressions).
133
133
134
+
For convenience Solid exports interfaces to runtimes for these as:
134
135
```js
135
-
import { h } from'solid-js/dom'
136
+
import { h } from'solid-js/h';
137
+
import { html } from'solid-js/html'
136
138
```
137
-
With HyperScript it is possible to map to element functions or even tagged template literals which offer many different development experiences. See examples below.
139
+
Remember you still need to install the library separately for these to work.
138
140
139
141
## Components
140
142
@@ -225,7 +227,7 @@ I cover this in more detail in my Bring Your Own Framework Blog Series(links bel
0 commit comments