Skip to Content
Full-Stack React Projects - Second Edition
book

Full-Stack React Projects - Second Edition

by Shama Hoque
April 2020
Intermediate to advanced
716 pages
18h 55m
English
Packt Publishing
Content preview from Full-Stack React Projects - Second Edition

Rendering the edit form and delete option

We will render the edit expense form and delete option in the Expenses component view. For each expense record rendered in a Material-UI ExpansionPanel component in this view, we will add form fields in the ExpansionPanelDetails section, with each field pre-populated with the corresponding expense detail value. Users will be able to interact with these form fields to change the values and then click on the Update button to save the changes to the database. We will add these form fields in the view along with the Update button and delete option, as shown in the following code.

mern-expense-tracker/client/expense/Expenses.js:

 <ExpansionPanelDetails style={{display: 'block'}}>   <div>  <TextField label="Title" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Full-Stack React Projects

Full-Stack React Projects

Shama Hoque
React Native - The Practical Guide

React Native - The Practical Guide

Academind by Maximilian Schwarzmüller GmbH

Publisher Resources

ISBN: 9781839215414Supplemental Content