{"action":"created","issue":{"url":"https://api.github.com/repos/vazco/uniforms/issues/323","repository_url":"https://api.github.com/repos/vazco/uniforms","labels_url":"https://api.github.com/repos/vazco/uniforms/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/vazco/uniforms/issues/323/comments","events_url":"https://api.github.com/repos/vazco/uniforms/issues/323/events","html_url":"https://github.com/vazco/uniforms/issues/323","id":246433538,"number":323,"title":"Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `CustomAuto`.","user":{"login":"lc3t35","id":921372,"avatar_url":"https://avatars0.githubusercontent.com/u/921372?v=4","gravatar_id":"","url":"https://api.github.com/users/lc3t35","html_url":"https://github.com/lc3t35","followers_url":"https://api.github.com/users/lc3t35/followers","following_url":"https://api.github.com/users/lc3t35/following{/other_user}","gists_url":"https://api.github.com/users/lc3t35/gists{/gist_id}","starred_url":"https://api.github.com/users/lc3t35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lc3t35/subscriptions","organizations_url":"https://api.github.com/users/lc3t35/orgs","repos_url":"https://api.github.com/users/lc3t35/repos","events_url":"https://api.github.com/users/lc3t35/events{/privacy}","received_events_url":"https://api.github.com/users/lc3t35/received_events","type":"User","site_admin":false},"labels":[{"id":373826917,"url":"https://api.github.com/repos/vazco/uniforms/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars3.githubusercontent.com/u/1379064?v=4","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"assignees":[{"login":"radekmie","id":1379064,"avatar_url":"https://avatars3.githubusercontent.com/u/1379064?v=4","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-07-28T19:05:48Z","updated_at":"2017-07-29T08:02:54Z","closed_at":"2017-07-28T21:27:43Z","body":"Here is the code than generates the error , I need better documentation or an example of Custom Field\r\n````\r\nimport {AutoForm, DateField, SubmitField, ErrorsField} from 'uniforms-semantic';\r\nimport AutoField from 'uniforms-semantic/AutoField';\r\nimport connectField from 'uniforms/connectField';\r\nimport {Grid} from 'semantic-ui-react';\r\nimport Kronos from 'react-kronos';\r\n/..blabla ../\r\n\r\nrender() {\r\n/..blabla ../\r\n\r\n   const determineComponentFromProps = props => {\r\n      console.log(props);   ->> ok\r\n      console.log(start_date);  => ok too\r\n      return (\r\n        <div>\r\n          <h1> {start_date.toString()} </h1>\r\n          { /* expected component is <Kronos\r\n              name=\"start_date\"\r\n              date={start_date.toString()}\r\n              onChangeDateTime={this.onKronosStartDateChange}\r\n              options={kronosOptions}\r\n              format=\"DD/MM/YYYY\"\r\n              placeholder={start_date.toString()}\r\n              min={minDate}\r\n              returnAs=\"MOMENT\" /> */ }\r\n        </div>\r\n      );\r\n    };\r\n\r\n   const CustomAuto = props => {\r\n      const Component = determineComponentFromProps(props) || AutoField;\r\n      return (\r\n          <Component {...props} />\r\n      );\r\n    };\r\n\r\n    const CustomAutoField = connectField(CustomAuto, {\r\n        ensureValue:    false,\r\n        includeInChain: false,\r\n        initialValue:   true\r\n    });\r\n\r\n...\r\n\r\nreturn (\r\n    <div>\r\n      <AutoForm schema={Bookings.schema} onSubmit={this.onSubmit} model={ booking }>\r\n        <Grid>\r\n            <Grid.Row>\r\n                <Grid.Column>\r\n                    <DateField name=\"start\" placeholder/>\r\n                </Grid.Column>\r\n            </Grid.Row>\r\n            <Grid.Row>\r\n                <Grid.Column>\r\n                    <CustomAutoField name=\"start\"/> --> if i replace with a DateField here no error\r\n                </Grid.Column>\r\n            </Grid.Row>\r\n            <Grid.Row>\r\n                <Grid.Column>\r\n                    <SubmitField value={ booking && booking._id ? 'Modifier' : 'Réserver' } className=\"blue fluid\" />\r\n                    <ErrorsField />\r\n                </Grid.Column>\r\n            </Grid.Row>\r\n        </Grid>\r\n      </AutoForm>\r\n````\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vazco/uniforms/issues/comments/318812473","html_url":"https://github.com/vazco/uniforms/issues/323#issuecomment-318812473","issue_url":"https://api.github.com/repos/vazco/uniforms/issues/323","id":318812473,"user":{"login":"radekmie","id":1379064,"avatar_url":"https://avatars3.githubusercontent.com/u/1379064?v=4","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"created_at":"2017-07-29T08:02:54Z","updated_at":"2017-07-29T08:02:54Z","body":"In your case creating a `KronosField` makes more sense.\r\n\r\n```js\r\n// Underscore to not conflict with the wrapper.\r\nimport Kronos_ from '?';\r\n\r\nconst Kronos = props =>\r\n    <Kronos_\r\n        // Use props here - I don't know what Kronos is.        \r\n    />\r\n;\r\n\r\n// Again, I don't know what Kronos is but I guess it's not a string input.\r\nconst KronosField = connectField(Kronos, {ensureValue: false});\r\n\r\nconst determineComponentFromProps = props => {\r\n    if (shouldItRenderAsAKronosField(props))\r\n        return KronosField;\r\n};\r\n\r\nconst CustomAuto = props => {\r\n    const Component = determineComponentFromProps(props) || AutoField;\r\n    return (\r\n        <Component {...props} />\r\n    );\r\n};\r\n```"}}
{"actor":{"display_login":"radekmie"}}