Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjazzyfunky committed Mar 7, 2019
1 parent 2bedf94 commit a8ef1f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mount(HelloWorld(), 'main-content')
#### Simple counter (using hook API and JSX)

```jsx
import { createElement, defineComponent, mount, useState } from 'js-surface'
import { createElement, defineComponent, mount, useCallback, useState } from 'js-surface'
import 'js-surface/adapt-dyo' // to use Dyo under the hood

// A 3rd-party general purpose validation library.
Expand Down Expand Up @@ -211,7 +211,7 @@ What are the main difference to React's API?
```

* In React a virtual element is represented by an object of shape
`{ $$typeof, type, props, key, ref, ... }.
`{ $$typeof, type, props, key, ref, ... }`.
To access `type` or `props` of a virtual elements you have to use
`elem.type` and `elem.props`.<br>
In js-surface on the other hand a virtual element is considered
Expand All @@ -221,7 +221,7 @@ What are the main difference to React's API?
* In React the property `children` of `props` is a opaque datastructure.
To handle that React provides a singleton Object called `Children`
that provides some helper functions to work with `children`
(`Children.map`, `Children.forEach`, `Children.count` etc.).
(`Children.map`, `Children.forEach`, `Children.count` etc.).<br>
In js-surface `children` are also represented as a opaque data
structure. Similar to React, js-surface also has several helper functions
to work with `children` (`mapChildren`, `forEachChild`, `childCount` etc.)
Expand Down

0 comments on commit a8ef1f2

Please sign in to comment.