JSFiddle - React, Tailwind, and code Playground

HTML

<pre id="result"></pre>

JavaScript

$("#result").text("1行目\n2行目");