Exercise: Remix Actions
Our last exercise! Let's get a couple actions created!
Under exercise/remix-actions there are starter files. Two routes exist, one
for a machines list and one for creating machines. You have markup ready for
you. Your task is to make those pages functional!
-
Under
routes/machines.create.tsxadd an action that takes thenameandmodelfrom the form. Create a machine through themachine modeland thenredirectto the/machinesroute. Your new machine should appear! -
Under
routes/machinesadd a delete button to each machine list item. It should call an action to delete the machine, but we stay on the same page!