-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
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
Feature Request: Investigate adding async support for components #3406
Comments
In case it is helpful, we have a simple solution I cobbled together for the seed project to facilitate this. It does the job technically but has some issues. Here's how you define a component using it. Probably better ways of accomplishing this, just wanted to +1 the idea and show what we have. I would love to use something PF supported instead, and happy to help test/review the solution when it's ready. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Note for posterity: The solution @seanforyou23 is referring to above was removed from the patternfly-react-seed repo in patternfly/patternfly-react-seed#103. @seanforyou23's links above no longer work since they referenced the main branch: here's a permalink to the DynamicImport.tsx file before it was deleted, and a permalink to the usage before it was removed. It seems that solution was causing issues during a dependency upgrade and was removed since it was just a stub. If this is ever revisited, restoring that may be a good starting point. The rabbit hole that got me here is described in this comment: patternfly/patternfly-react-seed#103 (comment) |
Many applications are using a form of async communication (promises, observables, etc.) to load components. It would nice to have an optional feature that would provide this support for some of our components (e.g. A function that sets a state to loading, call an async function, and then load the component according to the developers needs) to do this in a standardize way.
Here is an example on how it's done with react-select:
https://react-select.com/async
If we can find a way to do this across components using the same API, and same code that would be the ideal solution.
This would be in addition to the demo request in #3405
The text was updated successfully, but these errors were encountered: