In total, we'll have three views:
- A list view
- A create view
- An update view
Each view has its own route. The create and update views share a common component because they're so similar.
In total, we'll have three views:
Each view has its own route. The create and update views share a common component because they're so similar.
Since our bsconfig.json includes subdirectories, we can create a src/customers directory to house related components, and BuckleScript will recursively look for Reason (and OCaml) files in subdirectories of src:
/* bsconfig.json */
...
"sources": {
"dir": "src",
"subdirs": true
},
...
Let's move on and rename the src/Page1.re component to src/customers/CustomerList.re. In the same directory, we'll later create Customer.re, which will be used to both create...