Refactoring to Fragments
Learn how to make the codebase better by reusing code with the help of fragments.
We'll cover the following...
We'll cover the following...
Reducing duplication
Our edit.html still has a lot of duplication going on per property. We should refactor this a bit and introduce a few fragments to reduce the duplication.
As a reminder, this is the HTML for a single input we currently have:
Differences between input fields
Looking at the other inputs, we see these differences between all of them:
- Name of the field.
- Name of