My html is getting very extensive, is there any way I can split it like react components

Trying to develop a complex application.
49 Replies
Kevin Powell
Kevin Powellā€¢14mo ago
HTML, no... you have to use something that will combine things together. I'm a big fan of Astro, because you can keep it really simple if you want to. https://astro.build
Astro
Astro
Astro is an all-in-one framework for building fast websites faster. Grab content from anywhere, deploy everywhere, and show the web what you've got.
JOY
JOYā€¢14mo ago
Thank you for your reply . Will this be suitable for making a dynamic web app? with lots of pages
vince
vinceā€¢14mo ago
Why not use react?
JOY
JOYā€¢14mo ago
React hard
vince
vinceā€¢14mo ago
If you want a dynamic web app with different ui states using a framework will be easiest Using plain JS will be harder It depends what project you're building and the scope of it If you just want to break your html into components you can look into html templates But without more context it's hard to say what approach might be best for your project
JOY
JOYā€¢14mo ago
We can use react in astro?
vince
vinceā€¢14mo ago
Yes
JOY
JOYā€¢14mo ago
It's a web app that provides templates , we can edit it
Jochem
Jochemā€¢14mo ago
if you're building a static site, astro is probably easier, but if you're building a dynamic site I'm pretty sure it's going to add complexity over using a framework like sveltekit or next
JOY
JOYā€¢14mo ago
The templates So should I use react only šŸ˜­ can't decide
Jochem
Jochemā€¢14mo ago
that depends on your project's needs
vince
vinceā€¢14mo ago
Web apps that provides templates sounds like a good use case for SSG Jochem and Kevin are way more knowledgeable than me though so I'll defer to them
Jochem
Jochemā€¢14mo ago
if you were doing it entirely in HTML so far, you're fine using Astro to build a static site as a next step. but if you really want to build a dynamic website, Sveltekit is probably the easiest to pick up right now you'll need a backend server of some kind though
JOY
JOYā€¢14mo ago
Ye
Jochem
Jochemā€¢14mo ago
given that we know next to nothing about what you're trying to build though, it's hard to give any proper advice
JOY
JOYā€¢14mo ago
It's a saas that provides pricing page templates , you can edit the templates according to your business services. And it should be easy to connect it to stripe The result after editing the template should be a peice of code that you can embed into your code. Like a fully functioning pricing page that can take payments Do u understand? I'm bad at explaining things And English too
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochemā€¢14mo ago
so you're generating payment widgets that other people can integrate with their own Stripe? and taking payments for this service through stripe?
JOY
JOYā€¢14mo ago
Nah I was just making ui Just started Ye
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
JOY
JOYā€¢14mo ago
šŸ˜¦
Jochem
Jochemā€¢14mo ago
you'll have to do some research into stripe and see if you need to run that on the backend or if you can get away with just frontend, and then you'll probably want to learn a lot more javascript and then a framework so you can build what you need
JOY
JOYā€¢14mo ago
Life is hard šŸ˜­
vince
vinceā€¢14mo ago
Honestly React is really easy (excluding caveats) to get started with I would just pick Astro and or React up and just go with it, you'll learn along the way šŸ™‚ You'll figure it out just gotta put some sweat into it
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
JOY
JOYā€¢14mo ago
I'll try
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
JOY
JOYā€¢14mo ago
Bro wtf
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochemā€¢14mo ago
seconding svelte(kit), it's very nice, and if you learn one framework you'll have less trouble switching to another than learning one from scratch make sure you have a good basic knowledge of javascript first though
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
JOY
JOYā€¢14mo ago
I can make calculators So yea
vince
vinceā€¢14mo ago
Honestly though lol
JOY
JOYā€¢14mo ago
ChatGPt never helps me Prolly bad at prompting
Jochem
Jochemā€¢14mo ago
it's not a good learning tool
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
vince
vinceā€¢14mo ago
I like it a lot for clarifying questions, using it to write code is a mistake
Jochem
Jochemā€¢14mo ago
it lies, and it is obsessed with using var which is instant-discard-pile if I see it in a project for a potential applicant
JOY
JOYā€¢14mo ago
Even I know var is bad Let and const good Stupid Sam altman
Unknown User
Unknown Userā€¢14mo ago
Message Not Public
Sign In & Join Server To View
JOY
JOYā€¢14mo ago
So sveltkit it is ? Right
Jochem
Jochemā€¢14mo ago
pick your own framework, but that's what I'd suggest atm yeah
JOY
JOYā€¢14mo ago
Thanks for help, flying goodbye kissies on your lips
Jochem
Jochemā€¢14mo ago
yeah, no thanks. Keep it appropriate please
JOY
JOYā€¢14mo ago
How about AWS for backend ? You tried AWS?
Jochem
Jochemā€¢14mo ago
not really. Again, depends on your scope
JOY
JOYā€¢14mo ago
For user authentication?
Jochem
Jochemā€¢14mo ago
it's an option yeah we're going very far off the original topic for the question though, and we're not here to just design your app for you
JOY
JOYā€¢14mo ago
Apologies if I come off as selfish