We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The image upload example is too complicated.
All state in the single hook is not readable: https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L27 React docs about splitting state variables: https://reactjs.org/docs/hooks-faq.html#should-i-use-one-or-many-state-variables
What is the difference between token and staticToken ? https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L58 https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L96
The cdnUrl available also in ResolveContext, uploader context is redundant: https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L55 Related issue: #2150
It will be better to split ImageUploader react component into something like:
Parent component:
// hooks and upload logic <ImageUploader /> -
Upload renderer: https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L115
<UploadForm fields={form.fields} onSubmitHandler={onSubmitHandler} />
Maybe other forms:
... <OtherForms defaultValue={cdnUrl} onClick={handleGetUrl} /> ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The image upload example is too complicated.
All state in the single hook is not readable:
https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L27
React docs about splitting state variables:
https://reactjs.org/docs/hooks-faq.html#should-i-use-one-or-many-state-variables
What is the difference between token and staticToken ?
https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L58
https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L96
The cdnUrl available also in ResolveContext, uploader context is redundant:
https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L55
Related issue:
#2150
It will be better to split ImageUploader react component into something like:
Parent component:
Upload renderer:
https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L115
Maybe other forms:
The text was updated successfully, but these errors were encountered: