Skip to content

Instantly share code, notes, and snippets.

View magsout's full-sized avatar
🦊
Coding and hacking around the world

Guillaume Démésy magsout

🦊
Coding and hacking around the world
View GitHub Profile
import React from "react"
const NewlineToBreak = props => {
const { text } = props
return (
<span>
{text.split("\n").map((item, key) => <span key={key}>{item}<br /></span>)}
</span>
)