Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
84 ms
·
751.
▲
by
acemarke
7y ago
From reading the docs and the source, it's not a proxy. It looks like it uses https://github.com/pretenderjs/pretender , which overwrites the original `XmlHttpRequest` and `fetch` functions in the browser to inte
752.
▲
by
acemarke
7y ago
Off the top of my head, the import logic could be something like: if(__DEV__) { require("loadApiMocking"); } Agreed that there'd be work to do to keep real code responses and mocked responses in sync, but
753.
▲
by
acemarke
7y ago
Yeah, Spectrum feels to me like it's "just" a standard web forum, albeit one with live reply updates and a chat-bubble style for its UI. I've certainly seen plenty of other forum software that has live updates as well, s
754.
▲
by
acemarke
7y ago
I'm an admin in Reactiflux, which is one of the largest programming communities in the world, and hosted on Discord ( https://www.reactiflux.com ). I agree that message flooding is an issue with a real-time chat channel envi
755.
▲
by
acemarke
7y ago
This GreaseMonkey userscript worked for me to revert the search results to their previous style: https://greasyfork.org/en/scripts/395257-better-google/code
756.
▲
by
acemarke
7y ago
I'd say it's definitely worth it. I wrote a blog post recently about my experiences learning and using TypeScript as both an app dev and a library maintainer for Redux: https://blog.isquaredsoftware.com/2019/1
757.
▲
by
acemarke
7y ago
I'm a big fan of using Plumbum [0] for writing more complex shell-script-like logic as Python. [0] https://plumbum.readthedocs.io/en/latest/
758.
▲
by
acemarke
7y ago
How is this different than existing tools like CodeSandbox and StackBlitz?
759.
▲
by
acemarke
7y ago
For reference, Redux doesn't "do anything" internally. It only calls the reducer function _you_ provide, and you are supposed to follow the rules of immutable updates inside that reducer: https://redux.js.org/
760.
▲
by
acemarke
7y ago
There's been some discussion of making things like a virtual scroller available under an "std" global namespace [0], and the Chrome/Edge teams recently did a refresh of just the visual appearance of the standard built-in
761.
▲
by
acemarke
7y ago
Gotta nitpick here. JS _is_ the native language for browsers. Therefore, it's reasonable to target it. While it's entirely possible to compile your language interpreter of choice to WASM and run that in a browser, you're now
762.
▲
by
acemarke
7y ago
Exactly. There's very good reasons why tools like Webpack and Babel exist. Here's two excellent articles that go over the history and use cases behind the JS tooling ecosystem: http://tinselcity.net/whys/pack
763.
▲
by
acemarke
7y ago
Still the primary reason why I use Firefox. It allows me to have effectively an infinite number of tabs open, grouped, organized, and opened based on what I'm actually trying to get done now, or what I need to get back to later.
764.
▲
by
acemarke
7y ago
I'm a Redux maintainer, and I strongly agree with this post. I've been suggesting that people avoid using Immutable.js for years [0]. There's just not enough benefit. Instead, we _do_ recommend that folks use the Immer libr
765.
▲
by
acemarke
7y ago
A typical example might be a blogging app where posts reference users. Each separate post might have to have a copy of the same user object, whereas with a normalized state structure [0], the posts reference users by ID, and there is a sin
766.
▲
by
acemarke
7y ago
We certainly aren't changing the actual name "action" to "event" in the code or docs. _However_, we _do_ have a new "Style Guide" docs page, and in that we tell people to "Model Actions As 'Event
767.
▲
by
acemarke
7y ago
This is specifically due to the fact that the original Flux implementation labeled these objects as "actions", and Redux was designed as a Flux Architecture implementation: https://github.com/reduxjs/redux
768.
▲
by
acemarke
7y ago
As I've pointed to a number of times throughout this thread, we created our new official Redux Toolkit package specifically to address those concerns: https://redux-toolkit.js.org In addition, our new Style Guide docs page
769.
▲
by
acemarke
7y ago
As I've said elsewhere in the thread, the Redux core is deliberately unopinionated. Redux Toolkit is our opinionated wrapper around that core that provides the best defaults for common cases and removes that "boilerplate":
770.
▲
by
acemarke
7y ago
Dan stopped actively maintaining Redux in the summer of 2016, when he handed the keys to myself and Tim Dorr. This coincided with him working full-time on React. He's occasionally dropped by to comment in an issue and leave an opinion
771.
▲
by
acemarke
7y ago
FWIW, our recommendation has always been to focus on learning React first, and _then_ learn Redux once you're comfortable with React. That minimizes the number of new concepts you're learning at once, clarifies the differences be
772.
▲
by
acemarke
7y ago
By default, `createAction` accepts a single argument, which it then includes as `action.payload.` This requires the least amount of code written to define the action creator, but requires the dispatching code (such as a click handler) to c
773.
▲
by
acemarke
7y ago
Yes, I'm a Redux maintainer. My point is that I can't do anything to prevent folks from asking "what state management approach should I use?", looking at NPM trends, reading other tutorials that espouse differing approa
774.
▲
by
acemarke
7y ago
FWIW, I'm the primary Redux maintainer, have written large chunks of the current docs (including the FAQ and the Style Guide), have overseen the development of the last three major versions of React-Redux (including writing v7 from scr
775.
▲
by
acemarke
7y ago
Which is 95% identical to a thunk syntactically, except that you've limited how that logic can be tested and reused. There are valid arguments against using thunks [0], but all you've done is put the exact same logic in a differe
776.
▲
by
acemarke
7y ago
Yeah, I know. I'm not blaming Dan here, specifically, just repeating what he's said several times himself. That's why we're doing the docs rewrite. The target audiences have changed since 2015 (new devs learning Redux
777.
▲
by
acemarke
7y ago
Yeah, we'll have to disagree here. We officially recommend consistently using action creators [0], and I talked about the reasons to use them in a blog post [1]. Switch statements and lookups are almost completely equivalent (except fo
778.
▲
by
acemarke
7y ago
Actions are _still_ always an "immutable serializable event". The async logic is going to live _somewhere_, either in your components, or outside of them. Thunks are a way to move that logic outside of your components. The end
779.
▲
by
acemarke
7y ago
Thanks for the feedback. I've pasted it into our "Docs Rewrite: Overview" issue for reference [0]. Responding a bit further: There's not much we can do about folks going back and forth between Redux and various non-Redu
780.
▲
by
acemarke
7y ago
Andrew's not wrong, but I'm also not entirely convinced it's as big of a concern as he's describing. For context, Andrew is a co-creator of Redux, and is a current React core team member. He's spent the last couple
More ›