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

Change async loading of template and tar file #52

Open
Kevin-Velasquez opened this issue Jun 7, 2019 · 0 comments
Open

Change async loading of template and tar file #52

Kevin-Velasquez opened this issue Jun 7, 2019 · 0 comments

Comments

@Kevin-Velasquez
Copy link
Collaborator

Kevin-Velasquez commented Jun 7, 2019

Loading of template is done in 'client/src/components/GeneratorApp/GeneratorApp.js' lines 59-69.
Loading of tar is done in 'client/src/components/GeneratorApp/Header/GeneratorAppHeader.js' lines 77-82.

Current implementation, due to time constraints, was to use a setTimeout() before attempting to retrieve data from the node.js server in server.js. This is an issue due to not being fault tolerant. ie. a slow connection might create a situation where the data isn't ready to be retrieved after the setTimeout() has expired or a large template generation might take longer, hence not be ready to be retrieved in time.

Methods to try:
Redux connect()
Redux subscribe()
Using Promises to wait until state changes

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

No branches or pull requests

1 participant