Moralis, NextJS and Typescript

Hi everyone, my question:

Is it possible to use Moralis with NextJS and Typescript? Where are the limitations if any?

Thank you

2 Likes

Hi Thomas,

As NextJs is built in Javascript it should work. We have not tested it thoroughly with that framework though. We have tested it with Gatsby and Create-react-app. So I assume NextJs would also work.

Support for Typescript is not officially supported and complete at the moment. But a β€œbest-effort so far” has been made here: https://github.com/MoralisWeb3/react-moralis/blob/main/types/moralis.d.ts. Note that it is not complete and might contain a few errors. But if you really want to use Typescript help, then this might help you a bit.

Good Typescript support out-of-the-box is on our roadmap.

4 Likes

NextJS is an SSR framework, and if you use NextJS with React you can turn the SSR features on a per component basis, so even if some server-side rendering static sites interfere with Moralis in some way (unlikely), you could turn it off within dynamic components. NextJS should work without a problem.

3 Likes

Thank you @Erno and @Dominik,
Further, will Moralis support Social Media Login like Torus?

We wil soon open up Moralis for third party plugins and at that point it will be possible to write a plug-in like that!

1 Like