• Frontend
  • Frontend Get Started

Frontend Get Started

Language

There's a language choice as well, use Typescript instead of Javascript can save you a lot of pain since it could lint your code, check simple mistakes and type errors so that it saves you a lot of time (especially if you're using Create React App, the rendering time to check your errors is a huge pain).

Guide to get started:

Use yarn create typescript or other bootstrap templates could also save you a lot of pain on creating a tsconfig.js file as a beginner.

And there's a guide on how to write clean and effective js/ts code:

Here is a trick when you're stuck on type problems as a beginner (usually on function argument):

Hover to your editor's variable and you should get a prompt on the types on argument, copy that type down and use your editor's auto import to import that types

You can also see other useful tricks.

Also, you can write cleaner code with functional programming:

Frontend Frameworks

The default frontend framework you need to master in web3 is React.

Although there are some other tech choices like Vue, Angular and Svelte, but none of them is comparable to React in terms of prevalence in web3, even in web2. I can see none of these library will front run React anytime soon since React has great community support and resources (libraries, frameworks, components, other wheels).

Traditionally, the backend can generate html template to dynamically render content with imperative approach, but React uses a declarative approach so that the code is actually easier to understand, see this. React's prevalence is also thanks to the recent trend of multi-tier architecture.

Here are some of the resources to get started on React: