Skip to content
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

Closed
dlabaj opened this issue Dec 13, 2019 · 4 comments
Closed

Feature Request: Investigate adding async support for components #3406

dlabaj opened this issue Dec 13, 2019 · 4 comments

Comments

@dlabaj
Copy link
Contributor

dlabaj commented Dec 13, 2019

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

@tlabaj tlabaj added the Spike label Dec 13, 2019
@seanforyou23
Copy link
Collaborator

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.

@stale
Copy link

stale bot commented Feb 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Feb 11, 2020
@stale stale bot closed this as completed Feb 27, 2020
@tlabaj tlabaj reopened this Mar 3, 2020
@stale stale bot removed the wontfix label Mar 3, 2020
@stale
Copy link

stale bot commented May 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label May 2, 2020
@stale stale bot closed this as completed May 16, 2020
@mturley
Copy link
Collaborator

mturley commented Aug 19, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants