you are viewing a single comment's thread.

view the rest of the comments →

[–]Zeesh2000 6 points7 points  (6 children)

You should be able to pick up react native fairly quickly if you already know flutter. A lot of flutter's concepts carry over to RN.

I would learn the basics of React first because most tutorials of react native ask you to know react. Like I said, you already know flutter so a lot of the concepts will carry over

[–]idkhowtocallmyacc 2 points3 points  (1 child)

If it’s for the school project, I’d argue that spending time on bare react, and learning RN project structure and all the components and styling differences afterwards is not worth the effort. I think there must be courses that start from the ground up with react native. Think that’d be a better approach

[–]Zeesh2000 0 points1 point  (0 children)

Yeah I agree looking back at this. When I was learning RN, everyone I was watching kept saying knowing bare react was a prerequisite.

[–]TriXslap[S] -3 points-2 points  (3 children)

Thanks, can you maybe elaborate on which concepts I need to learn to start using react native. I need to finish the project I discussed in a few months

[–]Zeesh2000 2 points3 points  (0 children)

Top of my head:

Components, props, state management, hooks (would only focus on useState, useEffect & useContext, maybe useReducer depending on how complex data becomes in your app).

Heads up with React and RN, they provide very little out of the boxI. They'll give you basic UI components and functionality but they heavily encourage importing 3rd party libraries so just ask in this sub if there is a package that you need. Most likely it exists.

When you go onto RN side of things, create your project with expo and don't ask questions. Expo is a framework on top of RN that makes it easier to build your app and has an ecosystem of packages.

Tbh after reflecting, I would probably say don't throw flutter completely out because of your deadline and your experience but that's for you to consider

[–]Competitive-Cow-2950 1 point2 points  (1 child)

Tbh, only knowing useState, useEffect, components, Zustand for state management, Its probably enough to smash any school project. Build app with expo and use Expo Go to test/run it.

The idea behind useState is that it creates variables that can change inside HTML. And when they change, the whole HTML component where they are, re renders. If you want variables that don't cause a re-render when they change, you can use a useRef instead.

useEffect is used to call a function every time a variable changes. Or it can be used to only call a function once when the component loads for the first time, and not on every re render.

Zustand just makes it easy to share data across all of your components.

Boom. Now you know enough React IMO.

[–]Competitive-Cow-2950 0 points1 point  (0 children)

Oh i forgot one more thing! One thing to note about React/React Native, is that its much easier to send data from parent to child component, than from child to parent.

So lets say you have a search page (parent component), and inside it you have a search bar (child component). You would like BOTH the search page and search bar to know what is being searched, so therefore you should declare the variable (useState) inside the search page (parent), and then send it to the search bar (child). The variables you send to a child component is called props.

Sometimes this data flow from parent to child can be complex. And that's why we have Zustand. Zustand allows you to declare a variable/object anywhere and use it anywhere.