We use yarn because it is determisting just as npm shrink wrap,i.e in whatever machine you run code it runs exactly the same way.
Orignally mvc was designed for server which was working wonderfully. Then people decided to use this flow on clint side,they created modals views controller seperated.
But this was not ideal for clint side so people at facebook desided to use some concepts of encaputations and created component based liberary. This proved to be a wonderfull idea,becuse it is easer to maintain as everything is encpsulated insied components,easier to reuse.But it comes with a cost of writting more code.
Prettier only handles stylistic things,i.e spaces and indentation.
We will be using arbnb config
Tooling Prettier:A great Formating tool
Read the concepts at [https://webpack.js.org/concepts/]
four key concepts
Entry-> It specifies which module to start bundeling from,and then looking at entry it recorsevely builds the
dependency graph,every dependency is then processed and outputted to files called bundles.
Loaders ->Webpack at its core only understand javascript,to make it understand other types of files loades are used.
To use it we need to import them on the top,and then provide a plugin array,they use apply function and can be used as new ........
contents of .babelrc
presets->In babel each kind of transpilation is done by plugin,suchas to convert arrow function to noramal function we need a plugin,hence to achive everything we need many plugins. A preset is a collection of plugin.
1)React Batches the state together if we do setState simultanoiusly,however providing a function in setstate does the job and this pattern should also be used for form updation[file:///Users/atishaybaid/work/open-movie-app/index.html]
2)Never assign props to state e.g this.state = { color: props.initialColor };
because this will not change when the props of parent is changing,insteed take the state-up.
Fragments->It is usefull when we want to render multiple things from render,prior to version 16.20,if we have to achive same
thing then we would have to wrap elements in some parent div