Breaking changes introduced with rendering modes - renderAndReplace
is now called render
to follow common practice with SPA frameworks rendering mechanisms. Additionally, the render locations below are more explicit on where they will place the JSX output. Finally, prepend and append now support top-level JSX fragments (before and after render locations require a top-level container element still).
New methods:
renderBefore(<Hello name="world" />, targetElement);
renderPrepend(<Hello name="world" />, targetElement);
render(<Hello name="world" />, targetElement);
renderAppend(<Hello name="world" />, targetElement);
renderAfter(<Hello name="world" />, targetElement);
Sadly the previous release had old code in it, this release fixes it.
- Add beforeEnd and afterEnd render options thanks to theodugautier
- Added Fragment support thanks to f107
This release needs extra care in the babel configuration to make Fragments work.
You need to replace babel-plugin-transform-react-jsx
with @babel/preset-react
.
Please check the README
for details.
- Added Object.entries Polyfill
- Changed distribution to include iife and es6 versions
- Added support for the
svg
tag