DEV Community

Aaron K Saunders
Aaron K Saunders

Posted on

5 1

Getting started with Realm for React Native Using Expo Template, Enhanced

Overview

Simple Expo React Native application to quickly get started with React Native RealmDb API, based on the starter template that is provided by Realm. I added a few things, specifically working with relationships in RealmDB since it was really what I was looking for before I started to create the video.

📝 Application Notes

  • Added relationships so there is a project and a project has mutiple tasks associated with it
  • added and additional screen which lists the Projects
  • Added React Navigation so that we could move between the screens
  • Added a new screen that lists all of the Projects that are in the application
  • Added the project name to the task list
  • Added the number of tasks associated with the Project to the project list
  • Added try catch block to capture errors from the realm.write blocks
  • Added code to delete the child Task objects of the Project
  • I think that the introduction of the Realm Context is mising some helpful support documentation and links along with how to use the new useQuery function.
  • I also think that the documentation on relationships is extremely lacking and I did my best to create something that will show it better

Source Code

GitHub logo aaronksaunders / ReactNativeRealm-Expo-Template

Simple Expo React Native application to quickly get started with Realm, based on the starter template that is provided by Realm

Expo Template Realm React Native Starter Application

Supports Expo iOS Supports Expo Android

Video Link

Simple Expo application to quickly get started with Realm, based on the starter template that is provided by Realm

📝 Application Notes

  • Added relationships so there is a project and a project has mutiple tasks associated with it
  • added and additional screen which lists the Projects
  • Added React Navigation so that we could move between the screens
  • Added a new screen that lists all of the Projects that are in the application
  • Added the project name to the task list
  • Added the number of tasks associated with the Project to the project list
  • Added try catch block to capture errors from the realm.write blocks
  • Added code to delete the child Task objects of the Project
  • I think that the introduction of the Realm Context is mising some helpful support documentation and links along with how to use the new useQuery…

Links

Heroku

Deliver your unique apps, your own way.

Heroku tackles the toil — patching and upgrading, 24/7 ops and security, build systems, failovers, and more. Stay focused on building great data-driven applications.

Learn More

Top comments (1)

Collapse
 
anupjoseph profile image
AnupJoseph •

It gives an error saying Did you run "pod install"? when running on android devices. An solution

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

đź‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay