DEV Community

Discussion on: React Devs, Why don't you use React Native for Web?

Collapse
 
brianl profile image
Brian Lim • Edited

I think you said it "if you are aiming for identical look and feel" well web user expectations are different than mobile user expectations so it doesn't fly

In the "real world" we don't have endless time to build from raw HTML and CSS so we grab off the shelf components and make due... The complexity comes from when the components don't support everything you need which is irritatingly a lot. Only paid products / near commercial products can get around that problem and they only do it by removing customization from you.

I built a data grid for work there is nothing on the market that comes remotely close to that other than paid commercial products / trialware for their paid grid... There's a reason why when you go to toolkits none of the wiring or hard work is done for you. Because everyone wants to make a big box that sells (or spreads) and nobody wants to solve the tiny little problem that takes weeks or months to finish. Like remembering the checkboxes through pagination in a data grid or select all.

All in all this problem will continue and is why we as developers get paid the big bucks. Maybe someone will magically invent a UI/UX engine that focuses on tracking state for components that doesn't take hundreds or thousands of lines of code to access, who knows. Until they do and until that becomes a success, devs will keep taking weeks or months or years to finish projects. And they won't use RN for web because the state management and business logic is the actual problem not the look of it. The look is important and that's why you have UI and UX designers but that isn't the hard part (it might be the time consuming part to get it pixel perfect but it's not like writing a reducer or writing a resolver)

Collapse
 
darthknoppix profile image
Seth Corker

You have an interesting argument, I think the business logic can be challenging but in my experience UI can be very complex and demanding too.

There are countless times I’ve built components to handle very specific problems the client has wanted to solve and although the logic is relatively simple, I can’t imagine creating a functional UI without a declarative UI library like React.

I’ve also tried native development and found constraints on iOS particularly challenging to get right and very brittle compared with flex layout.

I think the you’re point about user expectations is pertinent, the experience the user expects differs from platform to platform and it could be difficult to abstract the differences away and have completely shared code. I think there can be some middle ground though where commonalities are handled with shared code.

What are the most glaring omissions from components you’d like to see to avoid having to roll your own?

Collapse
 
brianl profile image
Brian Lim

You can do it you just have to know your namespacing incredibly well and all the tricks for it. And buy 3rd party controls : )

You can't avoid having to roll your own because that's the job -- make custom components that work. Even in the most seat warmer type of corporate job you are still "rolling your own" by wiring them together and touching the look if only a tiny bit. It's just that the components seem to be missing that extra 10% or 20% of work that if it were there, would make your life incredibly simple.

In no particular order I find pre-built components miss state management, caching, networking, data massaging in other words all the gnarly parts that developers get paid and paid very well to do. And yes I know that components are not supposed to do that but I don't care if they did, lives would be made easier. They will never have those features, unless it's a paid product (or demo of a paid product) because developing it makes huge assumptions that can't be made if you're making it for others to consume. Blame the disjointed nature of the web. It is okay it keeps us employed but it means we are glorified lego assemblers. That is also not a problem (nothing wrong with lego) but if you spend all your time doing "plumbing" type code you have less time for the reality, which in a browser is CSS (styling) and HTML (structure). Everything else is just some shit, invented in the past ten or fifteen years to make developer's lives "easier" but often makes it much harder or has very little value whatsoever unless your product or development team reaches a certain scale. Oh, and jobs. Can't forget jobs, must resume pad with the latest skills. Honestly makes me sick some days.

I don't think there will ever be sharing in the way you think between mobile and web, unless your UX and UI designers and company accepts the compromise that the web will look like the mobile or the mobile will look like the web which they won't. So technical supremacy? Forget it, nobody will go for it if it compromises even an iota of user experience nevermind deadlines. Besides I am not even convinced it is technically superior. You can't use a hammer when you want a wrench and so on.

I'm holding on but if I get irritated enough in the following years I might go back to school and escape this dirty work. Another option is to make my own "company" or cooperative. If it's made I will let you know and you can join me in the nirvana of shared web and mobile components among other things.

Thread Thread
 
maxdevjs profile image
maxdevjs

Cooperative...?