This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/codestyle.md

11 lines
470 B
Markdown
Raw Permalink Normal View History

2020-08-31 19:49:15 +05:30
# Code-style
- methods that return a promise should always use async/await
otherwise synchronous errors can get swallowed
2020-11-20 21:09:16 +05:30
you can return a promise without awaiting it though.
2020-08-31 19:49:15 +05:30
- only named exports, no default exports
otherwise it becomes hard to remember what was a default/named export
2020-09-03 14:58:27 +05:30
- should we return promises from storage mutation calls? probably not, as we don't await them anywhere. only read calls should return promises?
2020-11-20 21:09:16 +05:30
- we don't anymore