{"componentChunkName":"component---src-templates-post-js","path":"/setting-up-advanced-forms","result":{"data":{"markdownRemark":{"html":"<p>Genereally there comes a time when you've got do things in an advanced way in order to write maintainable code that won't compromise the developer experince. Customer experince tends to be loosely coupled to the developer experince. If things are a pain to maintain, the harder it will be to deliver value to your customers.</p>\n<p>So the way the mutation needs to be executed is in a multistep form that needs to be in separte components. The key driver for this is so that the user does not need to do everything on one page. This would be a poor user experince. Also you need to maintain a file that would easliy be 400+ lines of code.</p>\n<p>Our approach will be the following:</p>\n<p>☎️ Use <a href=\"https://ant.design/\">Ant design's</a> tabs and target the CSS classes to hide the controls</p>\n<p>☎️ Use <a href=\"https://www.apollographql.com/docs/react/v2.6/data/local-state/\">Apollo client's</a> Cache as a central state store to persist the data between the components and use it to trigger our mutation in the penulatmate mutation.</p>","frontmatter":{"date":"July 21, 2020","path":"/setting-up-advanced-forms","title":"Setting Up Advanced Forms","postnumber":45}}},"pageContext":{"previous":{"node":{"frontmatter":{"path":"/setup-apollo-cache","postnumber":46}}},"next":{"node":{"frontmatter":{"path":"/create-view-a-listing-page","postnumber":44}}}}},"staticQueryHashes":["3207677222","3649515864","63159454"]}