async-labs / saas

Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
https://saas-app.async-await.com
MIT License
4.06k stars 674 forks source link

Upcoming updates November 2021 (done) #163

Open tima101 opened 3 years ago

tima101 commented 3 years ago

Move changes to book/10-end, decided against creating Chapter 11:




Notes:



explain firing of lifecycle methods:

console.log('DiscussionPageComp.componentDidMount');

console.log('before condition DiscussionPageComp.componentDidUpdate');

console.log('inside condition DiscussionPageComp.componentDidUpdate');

console.log('DiscussionPageComp.componentWillUnmount');

explain firing of useEffect hook:

console.log('useEffect 1 for DiscussionPageCompFunctional');

console.log('useEffect 2 for DiscussionPageCompFunctional');
marcosCapistrano commented 3 years ago

About getInitialProps: https://nextjs.org/docs/api-reference/data-fetching/getInitialProps Should it be changed to the getStaticProps or getServerSideProps in fetching data for pages?

EDIT: sorry if this isn't the right place, is there a section for questions/suggestions?

tima101 commented 3 years ago

@marcosCapistrano Thanks for suggestion. I don't think there are many (or any) instances for using getStaticProps (fetch data and render page at build time instead of request time). But worth looking into it. I added task to my list.