iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incremental rendering for large markdowns

pke opened this issue · comments

Would it somehow be possible to render large markdown documents incrementally?
Like a virtual list view but with markdown blocks in it?

@pke i did using stringToTokens and tokensToAST together and regulating how many nodes you want to render.

Could you maybe please provide a code snippet here. Maybe we could add such functionality into the library.

@pke sure. You can find it here.
This is not a perfect solution, but it fixes performance problems for the most cases.
And you can also try to render AST in a FlatList to get virtualizing.