Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AN
Posts
0
Comments
47
Joined
2 yr. ago

  • I count the number of items to get, and tell myself to remember the number, then I sometimes summon devil's help to recall the very last item at the store. Half probability of successfully remembering to get the items justifies not writing in the first place.

  • Hello, I just came across this post while searching on lemmy, I hope you don't mind my late comment on this post, so I can contribute to Lemmy. I have read your post multiple times, but if it's not the answer you're looking for, then I apologise in advance.

    Messed up node modules, because I used npm and yarn

    Delete node modules and do npm i or npm ci or yarn add.

    Order

    I usually do venv first, then I do Django backend, then React Native Expo frontend. However, the order itself isn't that important, because the frontend and backend folders are separated. Doing backend then frontend is just more convenient since API is used.

    For example, you deploy Django first then you compile Expo and you will see your API fetches. If you decide to do Expo first then Django it is still fine, just when you open your Expo app, you won't see your API stuff from Django until you deploy Django.

    A heads up that it's a separate story if you use Docker, which I think you aren't, since Docker is not mentioned.

    Path

    • I use .env file for React Native

      REACT_APP_API_URL = 'http://127.0.0.1:8000'

    • I use relative paths (src, import) in Django and React Native

      './relative-folder/relative-photo.jpg'

    • I use dynamic path in Django

      os.path.join

    It is generally advised not to use hardcoded paths, try to avoid if possible because whilst it works when you are developing locally, using hardcoded paths may not work during deployment. For Expo using hardcoded paths should still work.

  • I keep everything in containers, even for vegetables. Smelly stuff would go into glass containers. I clean a small section every two weeks (wipe around, wash trays) since the fridge will never be empty. What is smell?