GitHub pages allow us to host static sites from a repository. NextJS can be used as a static site generator. If we combine these two things and add some GitHub Action we get a React-based website that is easy to maintain, test, and host.
To generate static output we need to add
next export command that creates a static version of the application.
"dev": "next dev",
"build": "next build",
+ "export": "next export",
"start": "next start"
According to the NextJS documentation, there is a few caveats we must meet (e.g. we can not use
getServerSideProps because of…
In this post, I will present some practical approaches to test an application that uses thunks from the redux-thunk library.
While browsing the web looking for ways and good practices to test redux state, many times I came across tests that check implementation details, not logic.
I don’t see much sense in such an approach, which will almost certainly be expensive to maintain — testing will become sensitive to change. What should be of interest to us is the effect of dispatched action on the state and possible check of selectors, if we have any.
const store = mockStore(initialState);