A Redux async action example to search Twitter with Twitter REST APIs
- Redux async action
- Twitter REST APIs
- CSS modules
- Test with Jest
- Server side rendering (SSR)
- Pass
refto HOC/Redux's connected components withReact.forwardRef
Notes: We use babel-node for development (and build by babel for production). babel use babel-plugin-css-modules-transform to handle scss files then it ignores style-loader which loaded by webpack-dev-middleware. To support SSR we need to only use webpack for client side code.
yarn install
yarn test
yarn start to start an Express server at http://localhost:8080 with HMR (nodemon is utilized for its live loading feature).
yarn build to build code for production mode e.g. use CSS file instead of inline style.
In order to run this application locally you need to create a Twitter application in your own Twitter account then provide valid CONSUMER_KEY and CONSUMER_SECRET in .env file.
©2018 Tien Do
MIT License.
