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

193
Views
no se puede conectar el botón ToggleSwitch a firebase

** Estoy tratando de hacer una conexión entre firebase y el botón de cambio en la aplicación reactjs para realizar una acción específica, pero nada aparece como un elemento secundario o nuevo en firebase, ingrese la descripción de la imagen aquí **n

 import jQuery from 'jquery'; import firebase from 'firebase'; export default function ToggleSwitch_temp() { jQuery(document).on(function(){ var database = firebase.database(); var Led1Status; database.ref().on("value", function(snap){ Led1Status = snap.val().Led1Status; jQuery(".toggleSwitch").on(function(){ let firebaseRef = firebase.database().ref().child("Led1Status"); if(Led1Status === "1"){ // post to firebase firebaseRef.set("0"); Led1Status = "0"; } else { firebaseRef.set("1"); Led1Status = "1"; } }) }); } ); return ( <div className="toggle-switch"> <input type="checkbox" className="toggle-switch-checkbox" name="toggleSwitch" id="toggleSwitch" /> <label className="toggle-switch-label" htmlFor="toggleSwitch"> <span className="toggle-switch-inner" /> <span className="toggle-switch-switch" /> </label> </div> ); }
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!