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

update async component docs with feedback from RUG-N 17.06.2019 #60

Merged
merged 2 commits into from Jun 20, 2019

Conversation

pascalwengerter
Copy link
Contributor

Making the behaviour of the async component and the corresponding prepare method more explicit in the docs

docs/components/async.md Outdated Show resolved Hide resolved
docs/components/async.md Outdated Show resolved Hide resolved
end
```

Firstly, the async component gets displayed on initial pageload, showing the most recently added user's name. On every occurance of `my_event`, the `prepare` method gets called, again fetching the most recently added user from the DB. This could lead to 1) unwanted information on the UI adn 2) a lot of unnecessary DB queries. We recommend to keep a close eye on the async component and, for this example, calling a partial with the DB query within the `div id: 'my-div'`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You dramatize this behaviour. Rerendering is supposed to fetch the latest state from the server... I don't know how this could lead to unintentionally showing unwanted information on the UI.

  2. We have to clarify the timing of DB queries according to their position on the UI. I think, currently they are always executed, even if they are exclusively defined in a block, which is not rerendered for example. I will take care of this when implementing caching

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope it gets clearer with the update I just pushed :)

@jonasjabari jonasjabari merged commit 735ad90 into master Jun 20, 2019
@pascalwengerter pascalwengerter deleted the update_async_documentation branch June 21, 2019 07:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants