My application is built on next js and quill works fine on localhost but on hosting server it does not load first time unless i refresh/reload the page.
import React, { useState, useEffect, useRef } from "react";
import dynamic from "next/dynamic";
const QuillNoSSRWrapper = dynamic(
async () => {
const { default: RQ } = await import("react-quill");
return ({ forwardedRef, ...props }) => <RQ ref={forwardedRef} {...props} />;
},
{
ssr: false,
}
);
const quillRef = useRef();
{loadQuillNow && <QuillNoSSRWrapper
theme="snow"
ref={quillRef}
onChange={handleDescription}
/>}
It will be very kind of you to help me fix this please, thank you.