Skip to content

What is the right way to add and display an element? #104

Answered by wooorm
reypm asked this question in Q&A
Discussion options

You must be logged in to vote

Promise support, from components, in React is very much WIP. For something like remarkjs/react-markdown#680 to land, that needs to happen first.

You can do two things:

a) create your own async component. You can use the components here to map custom elements (say my-directive to your fancy async component, and do async work there, not on the AST, but at render.
b) react-markdown is a tiny wrapper around other projects, look at the code, investigate the syntax-tree org, you can use those projects yourself, in your own async wrapper. Control the caches and stuff yourself manually

Replies: 3 comments 31 replies

Comment options

You must be logged in to vote
15 replies
@reypm
Comment options

@ChristianMurphy
Comment options

@reypm
Comment options

@ChristianMurphy
Comment options

@wooorm
Comment options

Comment options

You must be logged in to vote
10 replies
@reypm
Comment options

@wooorm
Comment options

@reypm
Comment options

@wooorm
Comment options

Answer selected by reypm
Comment options

You must be logged in to vote
6 replies
@reypm
Comment options

@wooorm
Comment options

@reypm
Comment options

@wooorm
Comment options

@reypm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants