DEV Community

Cover image for How can I use <pre/> tag in react JS ?
Gustavo Henrique Silva Tenório
Gustavo Henrique Silva Tenório

Posted on

8 2

How can I use <pre/> tag in react JS ?

Hellow my fellows!

Yesterday I learn a small detail, but important. I tried to add a code example using <pre> tag in my react page to create my web portfolio. But, the <pre> tag doesn't worked as expected.

How should I use ?

Simple, we need use the ` character to envolve the code example.

pre_tag_example

Simple :D!

Top comments (1)

Collapse
 
mahendranmurugan profile image
Mahendran Murugan

Thanks Man...!

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️