Skip to main content

If I want to code in React what is a good platform to use?

· 2 min read

When you want to start a new React project, the docs at React Dev suggest Next.js, Remix or Gatsby. These are heavy platforms, though, which come with alot of extras that you probably do not need, if you are coding a basic client side application, or more importantly if you are just experimenting with React. It's strange that Facebook, that maintains React, suggests these platforms, when they have their own homegrown platform, Docusaurus, which is easier to use, at least for smaller projects.

Install Docusaurus and Begin Coding and Sharing Easily

So actually, I think a better option to use is to just Install Docusaurus. Then you can use the Docusaurus React Page to code in React. Any feature of client-side React (as opposed to the new RSC, i.e. React Server Components, or Server Actions), can be used easily and seamlessly. For interacting with third-party APIs, you can just use useEffect or something like useSwr.

For coding and testing, you can of course to just code locally, but the great thing about Docusaurus is that it's trivial to publicly publish Docusaurus with any of the major hosting companies, like Cloudflare or Vercel. So you have an easy way of sharing your code publicly. A final added benefit, is that you also have a blog and documentation functionality built-in, in case you want to further market or explain your code.

Bonus: Code in Replit

Replit.com is an amazing coding platform that you can use instead of installing anything locally. It allows you to code anywhere and forego the massive pain of installing packages on your local machine.

To use Docusaurus Replit, you need a .replit file with the following run command (assuming you are using NPM),

run = "npm run start -- --port 8080 --host 0.0.0.0"

For yarn it is:

run = "yarn start --port 8080 --host 0.0.0.0"