I am using @uiw/react-markdown-preview
for rendering the text as rich text and working as expected. I need to render the text like streaming, Anyone can help on this?
import MarkdownPreview from '@uiw/react-markdown-preview';
const text = "Here's a JavaScript function that generates the Fibonacci sequence up to a given number:nn```javascriptnfunction fibonacci(n) {n let first = 0;n let second = 1;nn console.log(first);n console.log(second);nn for (let i = 2; i < n; i++) {n let next = first + second;n console.log(next);n [first, second] = [second, next];n }n}nnfibonacci(10);n```nnThis code will print the Fibonacci sequence up to the 10th number:nn0n1n1n2n3n5n8n13n21n34nnIf you run this code in a JavaScript environment (like Node.js or a web browser console), it should display these numbers as output."
<MarkdownPreview
className="mark-down-box"
source={text}
wrapperElement={{ "data-color-mode": "dark" }}
/>
I need to render these output like streaming. meaning display the output character by character. Any idea?