Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Oct 18, 2019
1 parent 086b773 commit e56d1b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -126,6 +126,8 @@ The easiest way to get setup is add `babel-preset-solid` to your .babelrc, or ba
"presets": ["solid"]
```

Remember there are significant differences between how Solid's JSX works and a library like React. Refer to [JSX Rendering](../master/documentation/rendering.md) for more information.

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).

For convenience Solid exports interfaces to runtimes for these as:
Expand Down
4 changes: 2 additions & 2 deletions documentation/rendering.md
Expand Up @@ -32,7 +32,7 @@ If you need to use non-lowercase or hyphenated event names use the events bindin

## 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. Current 'For', 'Show', 'Switch/Match', 'Suspense', and 'Portal' 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. Currently 'For', 'Show', 'Switch/Match', 'Suspense', and 'Portal' are supported.

```jsx
<ul>
Expand All @@ -49,7 +49,7 @@ While you could use a map function for loops and raw ternary operators of condit
</ul>
```

_Note these are designed to handle more complex scenarios like template/component insertions. Child expressions are inert unless you return a function. For simple dynamic strings use ternary operator._
_Note these are designed to handle more complex scenarios like Component insertions. Child expressions are inert unless you return a function. For simple dynamic strings use ternary operator._

The library also includes a couple transform directives that can be applied to the For control flow.

Expand Down

0 comments on commit e56d1b6

Please sign in to comment.