Posted by
Tingan Tang
on May 08, 2023 ·
3 mins read
Motivation
The original motivation for the wordslet came from my elder son's complain that
Quizlet is too expensive. Although quizlet has free version, but there are many
limitations such as limiting the times of learning during one day. Also the free
version of quizlet has too many ads. Also, I feel that I also need such as an
app for helping me learn Finnish. Originally, I developed a web-based wordslet
by React Hooks and Node (see:
https://tingan.github.io/2022/10/14/wordslet.html), it works fine and i use it
in daily basis. However, it has some shortcomings. For example, it need a server
or computer to run locally. Nowawdays, mobile is more popular and convenient
than computer. So I decided to rewrite it in React Native. As I am already very
familiar with React, Redux, React Native looks very natural and familiar to me.
The big differences is the component changes. Besides that, other differences
are related to mobile screen itself. E.g. in mobile app, there is a Keyboard
avoiding issue, which is not present in desktop.
Technology stack
Besides the React Native, for state management I made some evaluation between
Redux Toolkit (with Thunk) and Redux Tookkit Query (RTK Query). As RTK Query has
one benefit is the caching capability, which is very powerful and convenient.
Therefore, I chosen RTK Query for state management. For Data storage part,
initially I use Firebase 9 and firestore. Firebase works fine with the app, but
later I think if I use firebase, then later I still need to add advertisements
or monthly payment for cover the firebase cost. Then it would be no difference
with Quizlet. So I made a new branch to totally switch to local database
storage. For local database storage solution, initially i prefer realm database
as it's fast than sqlite. However, unfortunately, the realm doesn't support expo
48 (only alpha version available). So I chosen sqlite for the local database
storage. So the technology stack is: react native + RKT query + sqlite.