r/GoogleAppsScript • • Mar 15 '24

Question Using React Router with React Google Apps Script boilerplate

Hey, I was researching a lot and saw on a reddit post somewhere that it is possible to configure project's webpack (https://github.com/enuchi/React-Google-Apps-Script) to use React Router but I have no idea where to start can somebody give me guidance?
Also, I think that it is really possible, because using Parcel it is possible.

7 Upvotes

18 comments sorted by

4

u/NMDev Mar 15 '24

I have written several full web applications in GAS with React. let me see if I can find my template.

3

u/mikolaj_zieba Mar 15 '24

That would be super helpful. I only managed to make web apps with React Router using Parcel, but using this repo, I can develop and see localhost fast refresh changes, and I don't know how to use React Router with this repo.

1

u/-AEdwards- Mar 17 '24

at looking at others work, helps greatly.1ReplyShareReportSaveFollow

level 1thisagaingm · 2 days ago!RemindMe 1 day

I have been using Vite after reading this article - this is for a side bar BUT can be adapted for a webapp.

https://javascript.plainenglish.io/building-the-ultimate-google-apps-script-front-ends-part-1-bundling-with-vite-6e456c2b710a

1

u/mikolaj_zieba Mar 17 '24

Hey, did you use React Router inside your Vite project? Also do you have any project that you could share (the article is not free)?

1

u/-AEdwards- Mar 17 '24 edited Mar 17 '24

Yes. I used react router which worked perfectly.

Sorry didn't realise that it was a member only article. I would thoroughly recommend looking for a free trial or pay $5 for a months access to check out the articles - there are 9 parts taking you through the setup etc.

It's more than I can share - but I would recommend it.

1

u/RemindMeBot Mar 17 '24

I will be messaging you in 1 day on 2024-03-18 15:19:23 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

1

u/NMDev Mar 19 '24

link is posted in a new comment

1

u/Mr_Greystone Mar 15 '24

Yes, please! I've found that looking at others work, helps greatly.

1

u/NMDev Mar 19 '24

link is posted in a new comment

1

u/mikolaj_zieba Mar 17 '24

UPDATE:
Now I see that react-router-dom works just fine when using version below 6.0, for anyone having problems I'll link another thread that helped me below:
https://www.reddit.com/r/GoogleAppsScript/comments/hee8vj/comment/kvb88c4/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

3

u/NMDev Mar 19 '24

My apologies for taking as long as I did, I came down sick with bronchitis over the weekend and I forgot to post the github link.

​

https://github.com/Nick-Rockford/React-App-Template

1

u/thisagaingm Mar 19 '24

Is your repository private? I get a 404 error and when I look at your profile, I do not see it. Thank you for sharing.

2

u/NMDev Mar 19 '24

my bad. should be good now. apparently the tool I use to push directly to GitHub defaults to private.

1

u/thisagaingm Mar 19 '24

Thank you very much!

2

u/NMDev Mar 19 '24

you're very welcome! let me know if you have any questions. This template has been used to create several internal company applications that are used daily. we code these guys all the time. admittedly, Im still very new to coding and would love to see what other people do with this kinda stuff.

1

u/thisagaingm Mar 15 '24

!RemindMe 1 day

2

u/NMDev Mar 19 '24

link is posted in a new comment

1

u/RemindMeBot Mar 15 '24 edited Mar 16 '24

I will be messaging you in 1 day on 2024-03-16 22:47:10 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback