Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
52 views
in Technique[技术] by (71.8m points)

javascript - how to convert react component to a jpg image?

i want to convert my react component into jpg image , so that user can download it. my component has a qr code section so i want users to download my qrcode component.

 <div className='QRComponent'>
         <div className='QRComponentTop'>
            <h3>Checkout Our Website</h3>
          
         </div>
        <div className='QRComponentQR'>
        <p>Scan QR to check our Website</p>
          <QRCode  ref={ref} logoWidth={70} logoHeight={70} logoImage='https://i.ibb.co/TbGQWXh/*****-Logo-3-4-removebg-preview.png' value={`${user_details.business  ? `https://*****.in/${user_details?.business.toUpperCase()}` : 'https://*****.in'}`} />
        </div>
        <div className='QRComponentBottom'>
            <h3>{user_details?.business}</h3>
            <h4>******.in/{user_details?.business}</h4>
            <div className='QRComponentBottom--logo'>
                <img src='https://i.ibb.co/TbGQWXh/******-Logo-3-4-removebg-preview.png'/>
                <h2>*****</h2>
            </div>
        </div>
        
        </div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
question from:https://stackoverflow.com/questions/65652058/how-to-convert-react-component-to-a-jpg-image

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...