{"action":"opened","issue":{"url":"https://api.github.com/repos/alexfedoseev/re-formality/issues/34","repository_url":"https://api.github.com/repos/alexfedoseev/re-formality","labels_url":"https://api.github.com/repos/alexfedoseev/re-formality/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/alexfedoseev/re-formality/issues/34/comments","events_url":"https://api.github.com/repos/alexfedoseev/re-formality/issues/34/events","html_url":"https://github.com/alexfedoseev/re-formality/issues/34","id":366094702,"node_id":"MDU6SXNzdWUzNjYwOTQ3MDI=","number":34,"title":"Complex forms","user":{"login":"baransu","id":9558691,"node_id":"MDQ6VXNlcjk1NTg2OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/9558691?v=4","gravatar_id":"","url":"https://api.github.com/users/baransu","html_url":"https://github.com/baransu","followers_url":"https://api.github.com/users/baransu/followers","following_url":"https://api.github.com/users/baransu/following{/other_user}","gists_url":"https://api.github.com/users/baransu/gists{/gist_id}","starred_url":"https://api.github.com/users/baransu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baransu/subscriptions","organizations_url":"https://api.github.com/users/baransu/orgs","repos_url":"https://api.github.com/users/baransu/repos","events_url":"https://api.github.com/users/baransu/events{/privacy}","received_events_url":"https://api.github.com/users/baransu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T21:52:46Z","updated_at":"2018-10-02T21:52:46Z","closed_at":null,"author_association":"NONE","body":"I'm trying to migrate plain reducer component that handles updates/validation of my form to `re-formality`. My form is complex and I'm having hard time thinking about correct values/fields/updaters. Here is type of the state:\r\n```reason\r\ntype state = {\r\n  name: string,\r\n  parts: list(part)\r\n}\r\nand part = {\r\n  image: string,\r\n  title: string,\r\n  subtitle: string,\r\n  buttons: list(button),\r\n}\r\nand button =\r\n  | UrlButton(url)\r\n  | PluginButton(plugin)\r\nand url = {\r\n  id: string,\r\n  caption: string,\r\n  url: string,\r\n}\r\nand plugin = {\r\n  caption: string,\r\n  pluginId: string,\r\n  instanceId: string,\r\n};\r\n```\r\nFor me it's really hard example. I want to have all functionality (like validation) available for even most nested values. Current API allows you to manage \"one level deep\" state really good manage but more complex state would require a lot of duplicated logic to update nested fields, a lot of fields, values etc.\r\n\r\nDo you have any ideas how we can improve `re-formality` API to better handle cases like this or how to approach this in application code using current API?"}}
{"actor":{"display_login":"baransu"}}