13 REACT Sorting Students data table

Veröffentlicht am: 19 Juni 2024
auf dem Kanal: Dr Umair Abdullah
64
0

Objective: implementing sort operation on student data table on the basis of id, student name

Pre-requisites:
1. Django API is running (implemented in previous videos)
2. REACT code is open in VS Code. and its web application is running (implemented in previous videos).


STEPS:
1. add a new variable 'asc' in the 'Student' component, to store true (for ascending) and/or false (for descending) information
2. define 'sortStudents' function, and update the students variable (which is displayed on Web page), and invert the 'asc'
3. Add 'onClick' function with 'th' (table headers) of all student attribute.
4. Save the code and test the sorting (ascending and descending) functionality on student table.


Auf dieser Seite können Sie das Online-Video 13 REACT Sorting Students data table mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Dr Umair Abdullah 19 Juni 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 64 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!