Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mambodog
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
mambodog
9y ago
You probably don't need Redux if it's just simple persistence of data. The simplest option is just to read and write a blob of JSON using the AsyncStorage API: https://facebook.github.io/react-native/docs/
62.
▲
by
mambodog
9y ago
What about 'view state' such as which tokens have been typed into a typeahead/tagging style input? Or the expansion state of levels of a tree view? The active tab of a tabbed UI?
63.
▲
by
mambodog
9y ago
I think manual DOM manipulation and lack of canonical state representation are both sources of spaghetti code; which one hurts more depends on the type of app you're building. Having the DOM as your canonical representation of state is
64.
▲
by
mambodog
9y ago
Sorry, I should have said 'the question' rather than 'your question'. The original article attempted to pull in the author's issues with a bunch of React-adjacent technologies to what was purportedly a criticism of
65.
▲
by
mambodog
9y ago
This part of the original article was referring to React Native. React != React Native, they are two separate projects. I realise that doesn't answer your question (which seems to be 'please justify React Native having a lot of op
66.
▲
When Does a Project Need React?
(css-tricks.com)
33 points
by
mambodog
9y ago
|
30 comments
67.
▲
by
mambodog
9y ago
I think you mean 'on average, nuclear is safer than rooftop solar'. How about nuclear vs. large scale solar? Large scale solar + wind? These are more realistic equivalents to nuclear.
68.
▲
by
mambodog
9y ago
This post is misleading throughout. The article shows snippets from the Redux and React Router docs, implying they are realistic examples of the way that typical React code should look, however, they are clearly snippets which are trying to
69.
▲
by
mambodog
9y ago
Humans have shown time and time again we cannot be trusted to consistently do things right, so the likely outcomes of some realistic percentage of 'terrible planning', as you put it, should be part of any comparison of power gener
70.
▲
by
mambodog
10y ago
This app was written by a manager, don't read into it too much ;)
71.
▲
by
mambodog
10y ago
PCE has very simple code, and unlike Basilisk II, doesn't make use of threads (which Emscripten didn't support at the time). Basilisk II also uses a SIGSEGV handler to catch invalid memory accesses, this would have to be coded aro
72.
▲
by
mambodog
10y ago
Interesting. What browser are you using?
73.
▲
by
mambodog
10y ago
I did the initial work of porting this emulator to the browser (most credit should go to the original emulator author however: http://hampa.ch/pce ). I wrote up the process and hacks that went in to making this possible here
74.
▲
by
mambodog
10y ago
One thing I like about Flow for small projects is that you can use the Flow 'comment syntax' so that you can start using Flow and leaning on the typechecker without adding any transpilation setup at all. Flow's inference mean
75.
▲
by
mambodog
10y ago
Coming from Javascript, Typescript and Flow have huge benefits which a much smaller learning curve than going straight to Elm. I recommend people who don't have experience with static types start with one of those two.
76.
▲
by
mambodog
10y ago
Rather than speculating, you can find out why you're seeing a particular ad on fb. There's a drop down on each ad which includes a menu item which explains the targeting method used: https://www.google.com/amp/
77.
▲
by
mambodog
10y ago
I mean if you really want to be loose with the type of your component's state, you can just declare its type as Object, eg. class MyComponent extends React.Component { state: Object; constructor(props) { supe
78.
▲
by
mambodog
10y ago
Twitter polls are only useful as a tool for demonstrating how polls with self-selected participation are utterly useless.
79.
▲
by
mambodog
10y ago
If it was created by humans then that would constitute a racist act. This system was created by humans.
80.
▲
by
mambodog
10y ago
Even if it was no-one's intent that the system is racially biased, allowing such a system to continue operate after learning of such a bias is a racist act.
81.
▲
by
mambodog
10y ago
That's fine. When you want to learn what's in the black box you can dig into it. The key is unblocking people on their path to their initial goal (eg. learn React) so they don't give up after getting stuck on a prerequisite (
82.
▲
by
mambodog
10y ago
Australia certainly doesn't have this problem, but that's probably not a surprise. As an example, here is some colourful language in a novel was a pretty standard text for English Literature classes in my state: https://
83.
▲
by
mambodog
10y ago
You can create one that you only use for work, but having an account (even if it's just a blank one) is kind of necessary. Edit: I don't know if you need one to apply, just to work
84.
▲
by
mambodog
10y ago
React is a view-centric component system. It's primarily used for view-related stuff, but the component abstraction is pretty powerful, so they can be useful in lightweight cases for application structure too (YMMV here). React Native
85.
▲
by
mambodog
10y ago
React Native's ListView culls offscreen views: https://facebook.github.io/react-native/docs/performance.htm...
86.
▲
by
mambodog
10y ago
In answer to your first question, yes. See the documentation for `render`: https://facebook.github.io/react/docs/react-dom.html#render In answer to your second question, yes, React currently only does anything as
87.
▲
by
mambodog
10y ago
You seem to be mistaken. You don't need to create components if you just want to render some divs. You can just do const {render} = require('react-dom'); const {DOM} = require('react'); render(
88.
▲
by
mambodog
10y ago
Automocking is off by default now, and a lot of work has been done to improve the developer experience in recent times.
89.
▲
by
mambodog
10y ago
can be handy for a really big space for ids, especially if you don't want to use strings. also bigger bitsets
90.
▲
by
mambodog
10y ago
> Start thinking there's something wrong with my app, that's "just" about to launch, and is "just" using plain old Redux Why would you think this? What problem are you having? What is your app supposed to
More ›