Chapter on Form generation - #11
Conversation
| In a better world, this is exactly where form generation would start to save your butt. After some googling, you find that Stripe actually has [an API endpoint](https://stripe.com/docs/api/country_specs/object) which you can use to grab a list of countries which they support. It contains all of the metadata you'll need to make decisions about which countries to include in your dropdown list! Suddenly you've got a solution on your hands which is much more maintainable: | ||
|
|
||
| ---- | ||
| // note: this is a simplified example, done in react, for illustration purposes. But you probably already knew that. |
There was a problem hiding this comment.
again mayb dont assume things about what user knows?
There was a problem hiding this comment.
cool start, i like that we're talking about dynamically populating data from the api in question but so far im not sure where the link is between json schema and this approach? Are you talking about some more basic and manual approaches to things and then getting to json schema later? if so, maybe only mention json schema later, or adda "but first in" because it seems a bit disconnected.
There was a problem hiding this comment.
Yeah I think this needs some rearranging yet - I'll likely start with the example, explain how we can procedurally generate an interface based on data coming back from an API, then talk about JSON schema specifically, and then a few choices for ways to take the schema and turn it into form controls
- why form generation is good
Incoming! Form generation chapter. This is a WIP, but I'm happy to take any feedback you may have 🙌