As the last test I rewrote route with params back to routes with map function, deployed and suddenly everything is refreshing normally! I created and reversed so many commits that I already forgot the initial differences. I am very very sorry for confusing everyone.
Though I understood the problem with params.
With every render I was creating the clone of data-array of objects in componentDidMount and set it to state in Context. This state was sent with props through route with params.
When you go to the page and refresh it, the component mounts faster than state managed to get calculated. Thus component doesn’t get props from Context, instead props.data = undefined, because the state dies with every refresh. So, render() is firing, but mount doesn’t happen. Params can influence this with refresh.
And, btw, the page becomes not blank, but it loads empty (I didn’t noticed it, because my background color is very close to white). render() -> not mount.
In this case the problem can be solved with 3 ways, as I see it:
- Setting state initially with reference to data-object (if it’s okay to change it), not with a copy.
- Use getDerivedStateFromProps
- Use local storage.
Big thank you to all people from support for being patient with me.