andycmaj / react-chat-renderer

React JSX factory implementation for Slack
15 stars 0 forks source link

Async testing #31

Closed andycmaj closed 4 years ago

andycmaj commented 4 years ago

enables async jsx component rendering.

adds render helper for type convenience... JSX element return type is any by default in typescript, so use render: Promise<any> to at least enforce that a promise is returned.

the biggest hack here is that inlining components into a template string requires that you call render/await the components, since all JSX <Tags> replaced by slack.h will now return promises.

will call this out in more detail in diff