[https://www.loom.com/share/1d8f40e9cc95463b8226324d9c5411bf](https://www.loom.com/share/1d8f40e9cc95463b8226324d9c5411bf "smartCard-inline")
- Try not to use useEffect’s in hooks, sometimes allwoed but most the time they aren’t
- Move the initializeDatabase to _app.tsx for client so it initializes on load globally
- Will possibly need a hook for the db to make connections
- getFactiiiItems
- Take in factiii ID and UpdatedAt and returns factiii
- Looks to RXDB if factiii updatedAt matches then return that
- If factiii missing or RXDB updatedAt is older then requestion the updated factiii from server and then store the updated factiii in RXDB and send to the function requesting it
- InitializeFactiiis
- Make sure to type out new variables
- modify the `getInitialFactiiiItems` to receive factiiiId and updatedAt instead of Factiii[] then use the above getter function to see if it has it locally
- Return the `waitForFactiiisLoad`