JSFiddle - React, Tailwind, and code Playground
by neosoyn
HTML
<ul><li id='first'>item1</li><li id='middle'>item2</li><li id='last'>item3</li></ul>
Babel + JSX
let newEl = document.createElement('li');
newEl.innerHTML = 'new';
const target = document.querySelector('#last');
console.log(target.nextSibling);
target.parentNode.insertBefore(newEl, null);