Live data from Hacker News

Base Web, Uber’s New Design System for Building Websites in React

eng.uber.com

31–40 of 156 posts

Re: Base Web, Uber’s New Design System for Building Websites in React

#31
I guess we can add Uber to this list of corporate frameworks...

https://news.ycombinator.com/item?id=18235887

https://element.eleme.io/

https://ant.design/

https://quasar-framework.org/

https://at-ui.github.io/at-ui/

https://developer.microsoft.com/en-us/fabric

https://vmware.github.io/clarity/

http://appnexus.github.io/lucid/

https://ng-lightning.github.io/ng-lightning/

https://blueprintjs.com/

http://www.jetbrains.org/ring-ui/

https://www.lightningdesignsystem.com/

https://elastic.github.io/eui/

https://atlaskit.atlassian.com/

Re: Base Web, Uber’s New Design System for Building Websites in React

#32
post #12

Earlier quoted context omitted.

There’s some work being done around renderless ui components but I’ve yet to see a complete framework.

Renderless? What are these good for?

They're like higher-order components on steroids that handle all the heavy lifting of the logic for the component (including what _should_ be rendered) but leave the actual rendering up to you (DOM structure, style, etc).

Here's a Vue example: https://banshee-ui.github.io/docs/guide/#why-banshee

Re: Base Web, Uber’s New Design System for Building Websites in React

#33

Earlier quoted context omitted.

As someone who stopped doing React development before Context became a "thing", is it possible to ELI5 in a couple sentences why it is such an important concept?

It's important, because you don't need to care about props vs state, instead, just consume the context deep in your component tree. One use case, is, suppose you have two independent contexts at two branches, now, if you want to share those data to 3rd branch, you just create new context with value from the first two contexts.

IMO, context does a lot to remove the value of MobX from React applications. Not necessarily Redux; Redux gives you some additional stuff, particularly around state tracking and rewinding. But I haven't seen a MobX project where a judiciously used context doesn't solve the same problem within the React-specific ecosystem.

Re: Base Web, Uber’s New Design System for Building Websites in React

#34

Earlier quoted context omitted.

[flagged]

Godwin's law strikes again. Static typing is great, don't get me wrong, but it's not always the right solution. There are cases where runtime flexibility can be useful.

TypeScript isn't statically typed, though. I make sure to keep my type boundaries clean but I haven't shied away from dropping into `any` if it was faster to express.

I did then get better at TypeScript over time and remove most of those cases, though.

Re: Base Web, Uber’s New Design System for Building Websites in React

#35
post #33

Earlier quoted context omitted.

It's important, because you don't need to care about props vs state, instead, just consume the context deep in your component tree. One use case, is, suppose you have two independent contexts at two branches, now, if you want to share those data to 3rd branch, you just create new context with value from the first two contexts.

IMO, context does a lot to remove the value of MobX from React applications. Not necessarily Redux; Redux gives you some additional stuff, particularly around state tracking and rewinding. But I haven't seen a MobX project where a judiciously used context doesn't solve the same problem within the React-specific ecosystem.

[deleted]

Re: Base Web, Uber’s New Design System for Building Websites in React

#36

Earlier quoted context omitted.

As someone who stopped doing React development before Context became a "thing", is it possible to ELI5 in a couple sentences why it is such an important concept?

It's important, because you don't need to care about props vs state, instead, just consume the context deep in your component tree. One use case, is, suppose you have two independent contexts at two branches, now, if you want to share those data to 3rd branch, you just create new context with value from the first two contexts.

This is starting to sound like the scope from Angular 1.

Re: Base Web, Uber’s New Design System for Building Websites in React

#37
post #19

Earlier quoted context omitted.

[flagged]

You're ignoring the fact that many already went through that phase and ultimately decided that complexity is the only enemy worth fighting in software. It always pays off to take a closer look at the things you can't think or say, to ask why.

> You're ignoring the fact that many already went through that phase and ultimately decided that complexity is the only enemy worth fighting in software.

No, this doesn't match my experience. The people who resist types are usually web designer types who haven't actually worked with type systems at all so they view it as ivory tower nonsense - complexity for complexity's sake.

There is the occasional person who worked with Java in college and hated it, and assumes that every language with types is just a variation on Java. This is, of course, not a very informed position.

Re: Base Web, Uber’s New Design System for Building Websites in React

#38
post #23

Imagine creating this beast of a "framework" and not even using TypeScript or Flow. What are you thinking? Edit: It does use Flow.

My only issue is TS usage with extremely large/complex components/containers. For example, files around 500 lines of code, I've temporarily removed TS, done a few other optimizations (ternaries for obvious If/Else statements, etc) to reduce to ~200-230 lines total. The file is instantly easier to reason about and modify. I wish there was a plugin that just did this automatically so you could toggle it back on when do…

It's best to leverage type inference if possible. I can point to entire TypeScript files that could be copied and pasted into a JavaScript file and work with no changes.

At some point, yes, you have to use annotations to get the most of it. But, ultimately, I'd much rather trade the additional characters now for the alternative: insanity producing runtime errors in production later.

Re: Base Web, Uber’s New Design System for Building Websites in React

#40
My favorite part about Base Web is that it's broken.

How to reproduce:

1. Visit the official website https://baseweb.design/

2. Click "Welcome" on the sidebar.

3. "An unexpected error has occurred."

No thanks, Uber. Your community of broscience engineers permanently lost me as a customer after the Susan Fowler writeup, and I'm not interested in your buggy technology either.

Post reply on HN