Open katjad opened 8 years ago
Great write-up, thanks Katja!
Finally googled this link that I had talked about: React roadmap https://github.com/wesbos/react-roadmap
Also, "browserify for webpack users" by substack, the creator of browserify: https://gist.github.com/substack/68f8d502be42d5cd4942 (called by one blogger JS Drama)
As for React, I really like it but also find an interesting question when to use it and when not. What do you really need it for. Perhaps we could make the session after next about React. @gicela?
@mjg17 thanks :)
Thanks for the React roadmap, Katja. Its really useful.
@katjad Sure thing. Let's talk about it at the next session. Still trying to keep up!
Found this useful as a very brief React overview (link from Flux for Stupid People as mentioned by Paul): http://blog.andrewray.me/reactjs-for-stupid-people/
I also found this React abd Redux Cheatsheets that might be useful: https://egghead.io/react-redux-cheatsheets?utm_source=drip&utm_medium=email
Thanks @gicela, downloaded. Also thanks @wingedeel for the link.
The two overriding topics for this day were probably build tools and React. In the coding session, several of us started on React - with one successful creation of a component, plus accidental installation of React Native and the realisation that the new spread operator in ES6 (...) is hard to google..
Before that I talked about adding first gulp and browserify to our project, then moving to webpack. Here a summary
A quick discussion of various build tools
Tasks in a project that make sense automating: For production: Concatenate, minify, compress images etc (to help with performance); during development: linting, automatic reload on save; in general: transpiling if necessary (for example, ES6 to ES5, JSX to JS)
Tools that help with that (only a few!):
package.json
file at root level of the project. Commands:npm init
-> creates apackage.json
filenpm install
(ornpm i
) [module] -> install a modulenpm i --save-dev [module]
-> install module and save to the package.json file as dev dependencynpm i --save [module]
install and save as dependency The node modules are stored in thenode_modules
directory which is automatically created when modules are installed vianpm i
. This folder is normally not commited to the repository of a project. It is enough to have thepackage.json
. If you are at root level and donpm i
the dependencies will automatically be installed.I have previously not worked much with build tools beyond using what others have set up. For our project, I had a go at introducing them to the existing codebase. You can see the results directly in the code, when you clone the repository :) : https://github.com/CodeHubOrg/organisations-database
The latest changes are now merged. There is some description of the changes in the README. Basically, I used webpack (see 3.), running it via an npm script. Webpack has a configuration file at root level, webpack.config.js. Depending on whether you type
npm run webpack
ornpm run dev-start
different configuration objects will be loaded. Note: There is also a babel configuration file (`babel.rc') which declares the needed presets ES2015 and react.At the moment webpack loads babel to turn ES6 to ES5 and JSX to JS, and bundles all dependencies together in one file. Depending on whether in development or production mode, webpack will just write a bundle, or start its own development server and only keep the bundle in memory. This allows automatic browser refresh when changes to css or React components are saved. There are a lot more tasks that could be added to the process. If you are interested in how the webpack config file is put together, I roughly followed this tutorial mentioned earlier: http://survivejs.com/webpack_react/ Please add any links that were discussed (if you remember). It doesn't need to have to do with the above. Anything we talked about.
Next time we will hear from @mjg17 about working with git. After that we should have everything in place to start working on the actual app :)