Saving state with gatsby/netlify

Hi everyone!

I have deployed a simple site to Netlify built with Gatsby that lets me view, add and delete events to a calendar, journal and todo list etc.

Can anyone tell me some way of saving the changes I make when I use my web app so that they are stored by the app. At the moment the React component state reverts to my default values each time I refresh the page.

Is it possible to write to files in my GitHub repository somehow so I can save the component’s state? When I was playing around with Nodejs it was a case of using the fs module to read and write to files, but I was only using that on a local server and I can’t find a way of doing this kind of thing with Gatsby.

I have started looking into Netlify CMS but I’m not sure that’s really what I want.

Many thanks for any help you can give.



There normally needs to be a computer somewhere on a network where you can save things to the storage of (eg a machine acting as server that has a database installed on it). You connect to that to save things to/read things from the database. You can save things in the browser’s own temporary storage using local storage, but that is still transient (it only applies to your browser, and if you clear storage or use incognito mode or whatever, it won’t be there). Firebase I guess is the easiest at the minute, has simple integrations with Gatsby etc.

Thank you for the reply, Dan. I’ll have a look at Firebase and similar. Cheers.