gluestack / gluestack-ui

React & React Native Components & Patterns (import from library & copy-paste styles all the way to victory)
https://gluestack.io/
MIT License
1.77k stars 89 forks source link

Feature / question: gluestackwithout react native? #2238

Open ashercn97 opened 2 weeks ago

ashercn97 commented 2 weeks ago

Description

Hi! I used gluestack-ui for an app I built with react native and loved it. I wanted to create a website as an extension of the app with the same styles. The issue is I want to make this just with normal react. Is there a way I can use either gluestack-ui or gluestack-style without needing the whole react native part?

Thanks!

Problem Statement

gluestack without react native

Proposed Solution or API

Use normal components in the styled function

Alternatives

No response

Additional Information

This might be a stupid idea/a solution already exists. Sorry if this is the case!

ashercn97 commented 2 weeks ago

And maybe with rsc?

Viraj-10 commented 2 weeks ago

Hey @ashercn97, Can you elaborate?

ashercn97 commented 1 week ago

Yes I totally can. Sorry if i was unclear!!

So basically I dont really understand why gluestack-style has react-native-web as a dependency when what it does for normal web is just make real css (at least thats my current understanding). Like i want to use gluestack-style but maybe like eject the css or somehow get normal css out of it so I can use (preferably) vanilla HTML, or react server components.

The reason I dont rlly want to use react-native-web is because 99% of the website wont need interactivity. I tried finding setup for react native web that wasnt in nextjs or cra, but it was kind of difficult. And, I just think it adds unnecessary complexity for my project.

Basically, I only need to make 1 page, and id love an easy way to get the same styling i used in my react native app without having to get a whole framework going and using rnw.

This might not align with the goals of the whole gluestack system, and if that is the case sorry for bringing this up!

P.S. SORRY THAT THIS IS POORLY WRITTEN!