Using MobX For FavoritedImages
Learn how to create MobX models and discover the steps of setting up MobX in an app.
We'll cover the following...
At the beginning of this course, we made a choice to write all examples in JavaScript. We have come to regret that decision while working on the examples with MobX. MobX documentation uses TypeScript (TS), a JavaScript superset, which brings many advantages.
Note: We encourage learning about TS. We will not spend any more time on this topic as there are hundreds of hugely valuable TS resources both online and in course form, but we wanted to let you know in case you read the MobX documentation, that the examples look a little different from the code in this course.
Creating a model for the user
Now that we have all of this out of the way, let’s get to coding! We will create a new folder called models
where we will store data models for our ...