-
-
Save STRML/2368912862f39ce8e832 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
"es2015" | |
], | |
"plugins": [ | |
"transform-runtime" | |
], | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react'); | |
var ReactDOMServer = require('react-dom/server'); | |
var iterable = new Map(); | |
iterable.set('a', React.createElement('div', null, 1)); | |
iterable.set('b', React.createElement('div', null, 2)); | |
console.log(ReactDOMServer.renderToStaticMarkup(React.createElement('div', null, iterable))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _map = require('babel-runtime/core-js/map'); | |
var _map2 = _interopRequireDefault(_map); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var React = require('react'); | |
var ReactDOMServer = require('react-dom/server'); | |
var iterable = new _map2.default(); | |
iterable.set('a', React.createElement('div', null, 1)); | |
iterable.set('b', React.createElement('div', null, 2)); | |
console.log(ReactDOMServer.renderToStaticMarkup(React.createElement('div', null, iterable))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/project/node_modules/fbjs/lib/invariant.js:46 | |
throw error; | |
^ | |
Invariant Violation: Objects are not valid as a React child (found: object with keys {_i, _f, _l, _s}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: Using Maps as children is not yet fully supported. It is an experimental feature that might be removed. Convert it to a sequence / iterable of keyed ReactElements instead. | |
<div><div>1</div><div>2</div></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment