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

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

You must be logged in to vote
15 replies
@reypm

@ChristianMurphy

@reypm

@ChristianMurphy

@wooorm

You must be logged in to vote
10 replies
@reypm

@wooorm

@reypm

@wooorm

Answer selected by reypm

You must be logged in to vote
6 replies
@reypm

@wooorm

@reypm

@wooorm

@reypm

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