noway - PUBLIC
  • DOCS FOR THINGS
  • _ref
    • Working Memory
    • NASA’s 10 rules for writing mission-critical code
    • React Native
  • _docs
    • Cryptography
    • Store APIs Key in FrontEnd SDK issues
    • APIs abuse issues
    • Webpack
    • Specific things
      • Text recognition
    • Book reviews
      • April 2020
      • 1-2/2020
      • March 2020
    • Visualization
    • MacOS
    • Go
    • Server
      • Easy way to setup a local HTTP Server on macOS
    • React
    • Reading
    • Tips
      • MVP
      • Sleeping in the right way
      • Get more things done
    • VS Code
      • Intelligent doesn't auto complete the JSX attribute or react-native components
      • Setting.json
    • Service Registration
      • Apple Enterprise Developer Account
    • DevOps
      • Using NGINX for ReactJS
    • Firebase
      • Upload image
      • Save data
      • Save Data with unique key
      • Setup local firebase functions
    • Documentation
      • API Documentation
    • React Native
      • Tips
      • Performance
      • Patterns in React
      • Rendering in React
      • View JS from apk
      • Flatlist with large data list causes blank view
      • Facebook SDK
      • Screen Events
      • Hotkeys
      • Deep Links
        • iOS Deep Link: Universal Link vs URL Schemes‌
        • Deferred Link‌
      • Text going off screen with flexDirection: 'row'
  • _posts
    • 2020-07-13-How-to-Understand-things
    • 2019-02-20-how-to-create-Jekyll-blog-with-github-page
    • 2019-03-01-books-02-19
    • 2019-02-11-highlight-the-pragmatic-programmer-part-01
    • 2019-02-15-highlight-the-pragmatic-programmer-part-03
    • 2019-02-14-highlight-the-pragmatic-programmer-part-02
    • 2019-04-11-books-03-19
    • 2019-03-07-telegram-bot-as-a-real-time-logger
    • 2019-02-04-generic-loading-ios
    • 2019-01-31-summary-books-01-19
    • 2019-03-27-short-polling-with-Swift
    • 2019-02-22-try-catch-exception-rather-than-return-codes
    • 2019-09-29-api-docs
  • category-archive
  • tag-archive
Powered by GitBook
On this page

Was this helpful?

  1. _docs

React

PreviousEasy way to setup a local HTTP Server on macOSNextReading

Last updated 5 years ago

Was this helpful?

Presentational just have props -> functional component/stateless component Container pass state + props -> Presentational

Pass func to setState

Avoid to setState in constructor with props Should call setState in componentDidMount Don't mutating state without setState. Whenever setState gets called in the future, the mutated state gets applied

Don't use index as key

Using batch for multi action to reduce re-render

https://vasanthk.gitbooks.io/react-bits/patterns/25.presentational-vs-container.html
https://vasanthk.gitbooks.io/react-bits/patterns/27.passing-function-to-setState.html
https://vasanthk.gitbooks.io/react-bits/anti-patterns/01.props-in-initial-state.html
https://vasanthk.gitbooks.io/react-bits/anti-patterns/04.setState-in-componentWillMount.html
https://vasanthk.gitbooks.io/react-bits/anti-patterns/05.mutating-state.html
https://vasanthk.gitbooks.io/react-bits/anti-patterns/06.using-indexes-as-key.html
https://react-redux.js.org/api/batch