Skip to content

Commit 15da715

Browse files
committed
docs: add jsxRaw example
1 parent add4e7a commit 15da715

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ module.exports = {
9898
jsxToString(<div>Hello</div>)
9999
// "<div>Hello</div>"
100100

101+
// raw expression
102+
const t = Date.now()
103+
jsxToString(<div>Now: {jsxRaw(Math.trunc(t / 1000))}</div>)
104+
// `<div>Now: ${Math.trunc(t / 1000)}</div>`
105+
101106
// class list
102107
jsxToString(<div className={['bar', 'foo']} />)
103108
// `<div class="bar foo"/>`

0 commit comments

Comments
 (0)