Integrating Angular 2 with React [closed] - reactjs

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Has anybody seen any good integration using both Angular 2 and React? This video indicates that it's possible: https://www.youtube.com/watch?v=XQM0K6YG18s
I would really like to have the below in my new project if that's possible:
Angular 2 web worker, service worker - https://www.oreilly.com/ideas/angular-2-and-the-future-of-html5-apps - e.g. to separate UI drawing and calculation to run on different CPU cores
Redux data flow - e.g. maybe using react-redux or ng2-redux to connect container component with presentational component
React inline style - e.g. Radium - http://stack.formidable.com/radium/, and this video explains why: https://www.youtube.com/watch?v=NoaxsCi13yQ
The challenges:
How do I draw a line between the code that should be written in Angular 2 and React
What should be compiled first, React JSX or Typescript? - this video shows that Typescript with React is not easy: https://www.youtube.com/watch?v=9PTa9-PPVAc
I know this question is likely not to have a definite answer, but if anybody know any active project trying to solve this (I can't find it), it would massively help my investigation.
Thanks in advance.
Update in Aug/2016
It's worth pointing out that react-typescript is doable, and there is now an reliable (created by the mobx creator) boilerplate mobx-react-typescript-boilerplate available (shame on me I haven't tried).
For anybody who has interest, mobx is a functional reactive framework that works well with React and came after Redux. See State Management is Easy on Youtube.

Related

React Context Vs Redux [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am a student trying to learn web development along with the ReactJs library. But I have a huge struggle selecting between React Context and Redux state management. I have never worked on real-time huge projects. So everyone is suggesting I should go with React context. Even my friend who is working on a real-time project in the IT field is using React Context instead of Redux in their project. So he suggests I should just stick with React Context. But I think Redux was there even before React context and is really suitable for huge projects. So a lot of the older projects may be using Redux. But Redux is really hard compared to React Context.
Can anyone give me a suggestion on whether I should just stick with React Context or I should learn Redux?
Depends on the scope of your project. There can be some problems with React Context with high frequency updates, but if it is mostly low frequency ( theme changes, authentication ) then just use React Context because it's simply better if you plan to use the data only in ReactJS and it's additional packages
Actually it is a good idea to know both. I would start with React context which is much smaller and easier to grasp, and out of the box.
Then you can switch to redux - and do some work with it. You will learn both since both are not that difficult.

Pure Components in React Native using Expo [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I started to work with React Native using Expo and I am trying to figure out what the best practices are. Due to my previous experience, I would like to avoid performance issues before they going to be difficult to handle. I've read some articles about Pure Components which seem to help to improve the performance. My question is whether Pure Components are compatible with the expo or if it even has something to do with Expo? I couldn't find any relevant information about it online.
Pure components has nothing to do with Expo. They are part of the React fundamentals.
It is impossible to teach you through a comment here the react lifecycles and performance optimizations so my best advises to you are:
Read a little bit about the react life cycles and understand when component gets rendered.
Use functional component and hooks as they will make your life much easier and it is the "modern" way to use react.
For performance improvement read a little bit about the RN bridge and learn "useMemo", "React.memo", "useCallback". The best way for me to get deeper understaning after reading documentation was watching YouTube videos. I really recommend the "Web Dev Simplified" channel.

Should I use Firebase with react. Alternative to Firebase as backend [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am taking this course building a chat app with react and firebase as backend. The problem is when I got to connecting react, redux, and firebase the whole process became so complex that got me wondering what's the point of Libraries, Frameworks, and SDK if not to make the development process easier or faster at least. Please is there other alternatives to using Firebase as backend with react. (Without so many add-ons, helper-functions, and enhancers that I need to connect)
There are quite a few alternatives: PubNub etc.. but all of them will require some setup and config to make it work with react. firebase by itself is not complicated, but make it work with react piles up the complexity a bit.
Just try it a bit more and once you are done with config and setup it way more fun. Here is a simple example to try: https://www.codementor.io/#yurio/all-you-need-is-react-firebase-4v7g9p4kf
The title doesn't explain your problem. I think its not firebase thats getting in the way, but in-fact redux/ react-redux-firebase.
If you're just learning react, you should not be trying redux. Redux has a steep learning curve, and will get in the way of you understanding the real part of react. Kent C. Dodds has said:
guess what, you probably don't need a library like Redux anymore
This might be speculation, but redux might not be as popular in the future, so you might not even have to learn it in the future. You can just use Context. People often abuse redux.

React or React Native to start learning [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have to work on project which has mobile application as well as web development too.For Mobile Application Development React Native has chosen but for Web development React has chosen.
I am new to React and confused from where i have to start learning. It should be React or React Native?
Thanks in advance for your answer.
I would recommend to first start learning React, and then move on to React Native as React Native builds on React, and assumes you are already familiar with it. As pointed out by Vucko, the official documentation is a great place for information, otherwise you are interested in reading a book instead, check out Learning React functional web development with react and redux by alex banks and eve porcello, this helped me figure out a lot of things, and also covers redux which you might be using in the future.

Why should I use Angular 2? What are it's advantages over Angular 1? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Angular 1 excels in data binding and provided a structued MVC MVW framework.
It fails in providing built-in modularity.
What are the core selling points of Angular 2? Im not looking for opinion, just plain simple bullet point facts and Im only interested in core selling points.
Also what other libraries such as bootstrap / polymer gel well with angular 2?
For me? Just off the top of my head:
Support for Functional Reactive Programming using RxJS Observables.
Built from the ground up with Typescript, meaning Types are a first class construct.
Unidirectional data flow.
Native ES6 Modules, no more endless script tags.
Fully component based.
Better template syntax.
An even better Router.
Much better Dependency Injection.
Support for sped up initial loads thanks to server-side prerendering.
ZoneJS Support, no more digest loop!
Of those my favorite feature is definitely the FRP support. We can drastically enhance performance by using Immutable Objects or Observables for our change detection.
The Formbuilder API as well as the HTTP API is fully compatible with RxJS making it very very powerful.
As for libraries, Angular-Material is obviously a big one. Another favorite of mine is NativeScript, which aims to create fully native mobile applications from your Angular 2 App. I'm sure there'll be tons more once it actually releases.

Resources