Skip to content

Commit

Permalink
Merge pull request #50 from grammarly/f-wrap-fragment
Browse files Browse the repository at this point in the history
Wrap in fragment render many list
  • Loading branch information
blacktaxi committed Oct 29, 2019
2 parents d0d8191 + c9914a9 commit b561fd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/examples/todomvc/webpack/dev_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ app.use(require('webpack-hot-middleware')(compiler));

app.get('/node_modules/todomvc-app-css/index.css', (req, res) => {
res.sendFile(path.join(
__dirname, '../node_modules/todomvc-app-css/index.css'));
__dirname, '../../../../node_modules/todomvc-app-css/index.css'));
});

app.get('/', (req, res) => {
Expand Down
5 changes: 4 additions & 1 deletion packages/focal/src/react/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ function render<P>(
for (let j = 0; j < i; ++j)
newChildren[j] = propValue[j]
}
newChildren[i] = observedValues[++k]
const childValue = observedValues[++k]
newChildren[i] = !childValue || childValue.key
? childValue
: React.createElement(React.Fragment, { key: i }, childValue)
} else if (newChildren) {
newChildren[i] = propValue[i]
}
Expand Down

0 comments on commit b561fd5

Please sign in to comment.