My goal with this article is to help you learn React. We will create a small twitter clone. I will guide you how to build your own app step-by-step and I will try to teach you all the little details you need to get started.
If you never tried React before in your life, this will be a good starting point for you. If you know already the basics of React, you may find this article boring at least.
You can fork my GitHub repo: @nicotsou/react-twitter.
Found something strange? You can suggest changes by creating issues. Pull requests are also…
No, seriously now, why did you become a software engineer?
Was it the beauty of the algorithms? The intelligence of the design patterns? The mysteriously blinking lights in server rooms? The revolution of technology and how it improves our lives? The happiness to see other people react to your creations? The agile manifest? The money they promised you? The feeling you helped the world become a better place? The need to have a job? The dirty hacks you invent to deal with something you don’t know? The fact you will never be without a job? The coffee you drink in…
Declarative programming makes your code more concise, easier to read and reason about and reduces side effects.
Procedural and object-oriented are forms of imperative programming, which implements algorithms in explicit steps. React embraces functional programming which is a form of declarative programming.
You describe what the program must accomplish for solving a problem, rather than describing how to accomplish.
Practical tips for writing declarative code:
Think state as a repository in the memory which stores data from a database, an api, the local cache, a UI element in the screen like a form field and more.
He wanted to create a predictable state container that supports logging, hot reloading, time traveling and universal apps.
Redux is a simpler implementation of the Flux pattern, an architecture…