I wish the react context api was still shitty so people would use it less
-
Show this thread
-
Replying to @threepointone
Curiously I think it might need to be used more in the future in some cases. For communicating between client islands around server code. It also nicely solves the "callback identity" issue if you pass dispatch through context. Very underutilized pattern.
3 replies 5 retweets 60 likes -
Replying to @dan_abramov
You’re expecting devs to use it more for that? Or that the react team will use it in react more? Latter good, former brittle.
4 replies 0 retweets 5 likes -
Replying to @threepointone @dan_abramov
It shouldn’t be used for sharing themes, for example. That feels like it should be a global/module,
4 replies 1 retweet 10 likes -
Replying to @threepointone @dan_abramov
Seb Insua Retweeted Sebastian Markbåge
There were similar tweets earlier in the year about this and I wondered back then whether it was correct to infer that `ThemeProvider`s are not good practice. I wish there was more clarity about good/bad patterns. https://twitter.com/sebmarkbage/status/1219836431972978689?s=21 …https://twitter.com/sebmarkbage/status/1219836431972978689 …
Seb Insua added,
4 replies 0 retweets 8 likes -
The first thing to figure out is if the Theme needs to be able to change while you're looking at the app and preserving state. Some are just a reusable component that can get customized but it doesn't ever change. I.e. there's no dark/light mode or theme switcher in the UI.
2 replies 1 retweet 9 likes
A theme switcher toggle at the top of the screen that switches between dark and light mode is a surprisingly popular idea at the place I work. (And I've unfortunately seen apps that block for quite a while when this is clicked.)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.