====== Reactjs begins ====== ===== Dev env ===== * http://localhost/~dang/wiki/doku.php?id=programming:jscript:nodejs_install#install_nodejs_globally_in_user_s_folder ==== Webpack ==== * https://medium.com/javascript-training/beginner-s-guide-to-webpack-b1f1a3638460 ===== Project structure ===== * https://daveceddia.com/react-project-structure/ * why I always went the other way? ===== Beginner Tutorial ===== * https://www.codementor.io/valentino/react-redux-tutorial-for-beginners-learning-redux-in-2018-fek71ojgh * https://cosmicjs.com/blog/how-to-build-a-todo-app-using-react-redux-and-webpack * https://daveceddia.com/where-fetch-data-redux/ ===== Good tutorial ===== * https://www.thegreatcodeadventure.com/react-redux-tutorial-part-vi-the-edit-feature/ * http://samhogy.co.uk/2017/04/reusing-redux-forms-for-creating-and-editing.html ===== Boilerplate ===== * https://github.com/iroy2000/react-redux-boilerplate#installation * ===== - Tips and Tricks ===== * Canvas object detection * capture image: https://medium.com/20spokes-whiteboard/how-to-approach-a-react-task-using-html5-camera-as-an-example-e67f41d97b2a * Disable cors checking: https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome * Master/detail view pagination * https://stackoverflow.com/questions/33940015/how-to-choose-the-redux-state-shape-for-an-app-with-list-detail-views-and-pagina * https://learn.co/lessons/react-router-nested-routes * Layout & routing * https://css-tricks.com/react-router-4/ * ==== Events passing ==== * Approaches: https://stackoverflow.com/a/31563614 * https://www.javascriptstuff.com/component-communication/ * https://github.com/markerikson/react-redux-links/blob/master/redux-ui-management.md ==== Compose ==== * https://blog.cloudboost.io/an-alternative-to-recompose-in-react-functional-programming-style-a117177997c1 compose merge functions: const hoc1 = ...; const hoc2 = ...; const enhance = compose(hoc1, hoc2); const Component = enhance(BaseComponent); The same thing can be done with the following. const Component = hoc1(hoc2(BaseComponent)); implementation of compose is quite simple. const compose = funcs => funcs.reduce((p, c) => (...args) => p(c(...args))); // this only works if funcs.length >= 2