jvsinghk / spacex

Front-end application which would help users list and browse all launches by SpaceX program
https://spacex-launch-programs.netlify.app/
3 stars 4 forks source link

Issue 7 server side rendering #13

Closed setheal closed 3 years ago

setheal commented 3 years ago

Resolve #7

I added the server side rendering thanks to ReactDOMServer, I also modified the index.js of React to get the possibility to hydrate the dom if needed.

I took the liberty of modifying the development server because the server side rendering depends of the react app being built. To start the development server it's now advised to use npm run dev.

I hope this solution is what you wanted 🚀

setheal commented 3 years ago

Hey @jvsinghk I looked on your screenshot and it seems like nodemon is not ignoring the build folder that's why it keep restarting. Can you check that you have this part in the dev script : --ignore 'build/*' ? Thank you.

EDIT: nevermind I just saw it in your screenshot... Can you run a npm run build and check if another files/folder is modified by the command ?

jvsinghk commented 3 years ago

Hey, @setheal I do have that. Before running npm run build I had some changes in package-lock.json and yarn.lock which I got after running npm install and yarn respectively. After running npm run build the build folder gets updated. and then I ran npm run dev which runs into the same issue. I have committed my changes if you allow me I can push them to your branch. That might help you to reproduce the bug.

setheal commented 3 years ago

@jvsinghk yes, push them pelase

jvsinghk commented 3 years ago

@setheal pushed it. review it, please

setheal commented 3 years ago

Hye @jvsinghk everythings works as a charm on my side. Are you still encountering this issue ?

setheal commented 3 years ago

Everything works as expected on my side, I'm really confused. Which OS are you running ?

setheal commented 3 years ago

hey @jvsinghk can you check the latest version please ?

jvsinghk commented 3 years ago

hey @jvsinghk can you check the latest version, please?

hey, @setheal checked the latest version, doesn't work.