Today, we will discuss state and props in react. In my previous posts, I already shared installation process of react and the introduction to a component in react. I hope these posts will help you to do a quick start with react. So now I am going to give an introduction about state and props in react.
we are going to discuss image or file upload in meteor with angular. image uploading is easy in the meteor. we will use uploadfs for image uploading. Uploadfs manage all things like file uploading, downloading, storing and copying etc. Uploadfs also use for file or image synchronization. we will use gridFS storage adapter.
a react component is used for reuse the UI. we can use our react component in another component. As we all know every page have some components, in react we can make individual components and assemble them to make any page. components accepts the inputs called props. react component describing what should display in view.
Amazon Simple Storage Service(S3) is service that provides the cloud storage simple web service interface to store and retrieve data from anywhere. Now we send 5 TB single object amount data to store in cloud through S3 web service
Customs services in angular mean you can create your own services or you can create your own unit of code which can be used in all module or controller. Custom services mean you write your own reusable code.
Services is a unit of code which can be used across the project controllers. Means when we create a service we can use it in any controllers of our project. Services required when we need to use the same code in multiple places. Services can be utilities or business logic unit which means whenever you write any kind of code as part of a service you had to consider that code to be almost independent of that particular controller. It also some business logic code.
Why services –
1-Services provides lots of built-in functionality
2-Best place to implement reusable code
3-Clean and maintainable code
A router is used for linking URL to controller and views. ui router is complete routing framework for angular (Watch now). ui router use states for routing. A state is a unit of organization.it is more comprehensive navigation criteria. ui router use for creating multiple views in single page applications.
In this post, we will setup angular 2 and their dependencies in our machine. We start with angular 2 with typescript so for angular 2 first we should have little bit knowledge of typescript.