DEV Community

Ayoola Damilare
Ayoola Damilare

Posted on

3 1

My React Journey Day1

I am super excited to kick off my journey in React Native! Building mobile apps has always been a dream of mine, and today, I took the first step towards making it a reality.

My focus today was on Variables (var, let, const) and Data Types (strings, numbers, arrays, booleans, and objects). Here's what I learned:

Variables (VAR, LET, CONST)
Understanding the differences between these three was eye-opening:

var: Can be reassigned and redeclared. It has function scope, which makes it more exposed and less secure in modern coding practices.
let: Can be reassigned but not redeclared. It uses block scope, making it safer and more preferred than var.
const: Cannot be reassigned or redeclared. Like let, it has block scope. It's perfect for values that should remain constant.

One takeaway: if a value shouldn't change, always use const. It ensures your code stays clean and predictable.

Data Types
Here's a quick breakdown of the data types I explored today:

Strings: A string is any text enclosed in either double quotes (" ") or single quotes (' '). For example, "Hello, world!" is a string.
Numbers: Any numeric value from 0 - 9, like 42 or 3.14, belongs to the number type.
Arrays: Think of an array as a collection of values stored in a single variable. For example, [1, 2, 3] or ['apple', 'banana', 'cherry'].
Booleans: This data type has only two possible values: true or false. It’s great for decision-making in code.
Objects: Objects are collections of related data in key-value pairs. For instance:

const person = {
  name: 'Jane',
  age: 25,
  greet: function () {
    return 'Hello!';
  }
};
Enter fullscreen mode Exit fullscreen mode

Objects can even include methods (functions) that belong to the object itself!

Final Thoughts
Overall, today was a beautiful learning ride. I feel more confident about the basics and can't wait to dive deeper tomorrow.

If you're also starting out or looking for a reason to learn React Native, why not join me on this daily challenge/ride? Let's build something amazing together!

Stay tuned for Day 2!

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series πŸ“Ί

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series πŸ‘€

Watch the Youtube series

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay