Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
Combine una imagen cargada y un texto arrastrable y descárguelos juntos en reaccionar

Soy nuevo para reaccionar y js. ¿Hay alguna manera de que pueda cargar una imagen y mover el texto que se puede arrastrar encima de esa imagen y cuando hago clic en descargar, la imagen junto con la descarga se guardan? Cualquier ayuda es muy apreciada.

Mi aplicación.js

 import './App.css'; import Land from './Land'; import React from 'react'; import Draggable from 'react-draggable'; import { saveAs } from 'file-saver' function App() { const [file, setFile] = React.useState(); function handleChange(e) { console.log(e.target.files); setFile(URL.createObjectURL(e.target.files[0])); } const downloadImage = () => { saveAs(file, 'image.jpg') // Put your image url here. } return ( <div className="App"> <h2>Add Image:</h2> <input type="file" onChange={handleChange} /> <div className='img-container'> <Land/> <img src={file} width ="100%"/> <button onClick={downloadImage}>Download!</button> </div> </div> ); } export default App;

Mi Tierra.js

 import React from 'react'; import Navbar from './Navbar'; import Hero from './Hero'; import pic from './me.png' import Draggable from 'react-draggable'; export default function Land() { return( <div> <Draggable> <div>I can now be moved around!</div> </Draggable> </div> ) }

Captura de pantalla de la página de destino

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!