Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 0483089

Browse files
committed
Add Context API awareness and reduce number of placeholders
1 parent 9a9a25c commit 0483089

File tree

8 files changed

+184
-144
lines changed

8 files changed

+184
-144
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ The use of cloneNode improves repeat insert performance and precompilation reduc
6666

6767
## Plugin Options
6868

69-
### moduleName
70-
The name of the runtime module to import the methods from. Required.
69+
### moduleName (required)
70+
The name of the runtime module to import the methods from.
7171

7272
### delegateEvents
7373
Boolean to indicate whether to enable automatic event delegation on camelCase.
7474

75+
### contextToCustomElements
76+
Boeolean Indicates whether to set current render context on Custom Elements and slots. Useful for seemless Context API with Web Components.
77+
7578
## Special Binding
7679

7780
### ref
@@ -179,7 +182,7 @@ Often for when there is no need for the argument and it can be skipped if desire
179182
<button onClick={ removeCompleted }>Clear Completed</button>
180183
</$>
181184
```
182-
Provide(Experimental) is used with a Context API to allow for hierarchically resolved dependency injection. The value provided will be either passed to an initializer function defined or will be the provided context.
185+
Provide(Experimental) is used with a Context API to allow for hierarchically resolved dependency injection. The value provided will be either passed to an initializer function defined or will be the provided context. Opt in for the specific library runtime.
183186

184187
```jsx
185188
<$ provide={ ThemeContext } value= { 'dark' }>
@@ -218,6 +221,10 @@ Supported by: each, when, suspend
218221
Uses a Shadow Root for portals.
219222
Supported by: portal
220223

224+
### value
225+
Sets initialization value for provide control flow.
226+
Supported by: provide
227+
221228
```jsx
222229
<$ each={ todos } fallback={<span>Loading...</span>}>{ todo =>
223230
<div>{todo.title}</div>

package-lock.json

+77-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "babel-plugin-jsx-dom-expressions",
33
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
4-
"version": "0.9.0-beta.0",
4+
"version": "0.9.0",
55
"author": "Ryan Carniato",
66
"license": "MIT",
77
"repository": {
@@ -17,13 +17,13 @@
1717
"prepublishOnly": "npm run build"
1818
},
1919
"devDependencies": {
20-
"@babel/core": "7.4.4",
21-
"babel-plugin-tester": "^6.1.0",
20+
"@babel/core": "7.4.5",
21+
"babel-plugin-tester": "^6.2.1",
2222
"coveralls": "3.0.3",
23-
"dom-expressions": "~0.8.0",
23+
"dom-expressions": "~0.8.5",
2424
"jest": "^24.8.0",
25-
"rollup": "^1.11.3",
26-
"rollup-plugin-node-resolve": "^4.2.3"
25+
"rollup": "^1.12.3",
26+
"rollup-plugin-node-resolve": "^5.0.0"
2727
},
2828
"dependencies": {
2929
"@babel/helper-module-imports": "^7.0.0",

0 commit comments

Comments
 (0)