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

664
Views
¿Cómo pasar datos a través de un spa único de navegar ToUrl ()?

Estaba usando <Link> de @material-ui/core/Link y pasé datos como los siguientes:

 <Link to={{ pathname: PATH, search: window.location.search, state: { isData: true, }, }} >

Ahora, voy a cambiar a un solo spa como se muestra a continuación:

 import * as singleSpa from 'single-spa'; <Link href={`${PATH}${window.location.search}`} onClick={(e) => { e.preventDefault(); singleSpa.navigateToUrl( `${PATH}${window.location.search}`, ); }}>

Pero en el caso anterior, no puedo pasar state: {isData: true}

Aquí está el módulo para navigationToUrl: -

 export function navigateToUrl( obj: | string | { currentTarget: { href: string; }; preventDefault: any; }, opts?: Object ): void;

Intenté lo siguiente para replicar la estructura, pero isData no se pasa: -

 <Link href={`${PATH}${window.location.search}`} onClick={(e) => { singleSpa.navigateToUrl( { currentTarget: { href: `${PATH}${window.location.search}`, }, preventDefault: e.preventDefault(), }, { isData: true, }, ); }} >

Además, preventDefault a ser undefined si lo hago arriba. ¿Alguien puede ayudar?

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!