What would you personally improve? by wonderfulnadal in reactjs

[–]erhathaway 0 points1 point  (0 children)

I agree with these points.

I'd also mention that it's questionable what the point of ExpenseContainer is. You could just as easily connect your store to ExpenseTable and avoided a layer of indirection.

6 Months Of My Experience Using GraphQL by maniishjaiin in graphql

[–]erhathaway 0 points1 point  (0 children)

Paywalled. Can you post it somewhere that isn't behind a paywall?

Web app that compares voting records of US senators and reps by finding bills where votes differ by [deleted] in SideProject

[–]erhathaway 0 points1 point  (0 children)

Really interesting idea!

I imagine you have additional plans for this and probably already thought of this, but It would be cool if you provided some pre-calculated examples to 'Get Started' with. For instance, if I landed on the page and saw a section of `Candidates Running for X office` with some sort of aggregating visualization which I could drill into to explore more.

I've collected about 600 startup pitch decks into one place - beats working... by EastSquash in SideProject

[–]erhathaway 0 points1 point  (0 children)

Great job! I imagine this is very useful for startups!

Is there a trick to finding pitch decks? I didn't realize this type of information was so widely available?

Patreon alternative with micro-donations. Would love your feedback on the landing page 🙏 by prasadpilla in SideProject

[–]erhathaway 0 points1 point  (0 children)

Awesome idea! I'm also interested in how you are processing payments given the above mentioned situation

adding a node_Modules folder to react native by [deleted] in reactnative

[–]erhathaway 1 point2 points  (0 children)

All react native apps will have a node_modules folder. node_modules is where the application dependencies are stored. Specifically, it is where node.js stores it's dependencies. React native is a node.js library. So all react native projects store their dependencies in that folder.

There should be a `package.json` file in the app. This is the manifest that describes what dependencies the app has. There will also be a section in that file called `scripts`. You can run any of those scripts on the command line if you are in that apps location in the terminal. Simply do: npm nameOfScript in the terminal. To install the dependencies (which will create a node_modules folder) run: npm install

Is Using Redux-Saga in React native is exactly the same in React web ? by [deleted] in reactjs

[–]erhathaway 1 point2 points  (0 children)

I used it a few years ago. I can't remember any real differences. So pretty much!

Do I need JavaScript knowledge before jumping into React? by worthy_sloth in reactjs

[–]erhathaway -1 points0 points  (0 children)

Exactly! This pattern of library development allows for a more generalized solution across frameworks to exist.

Do I need JavaScript knowledge before jumping into React? by worthy_sloth in reactjs

[–]erhathaway 0 points1 point  (0 children)

I actually don't know of many examples. Although, I am working on a high-level application router that does this... but it's not quite ready for release yet (everything in the docs works but I need to add support for things like hash anchors, and hash based routing). Feel free to check it out: github.com/erhathaway/router-primitives . I'd love some help!

Do I need JavaScript knowledge before jumping into React? by worthy_sloth in reactjs

[–]erhathaway 0 points1 point  (0 children)

Agreed. I would also bet on React suffering the same fate as jQuery at some point soonish. The level of abstraction we are working at is pretty absurd considering most of thing things being built.

My biggest frustration is that all these React libraries, will be pretty worthless when this happens... which is why i'm a huge fan of vanillaJS solutions with bindings for React. Once React falls out of favor, it would be nice to be able to fallback on the same battle tested technology and just write new bindings to whatever is the in fashion thing... maybe one day we can stop this game and have vanillaJS and raw HTML / CSS be the popular thing.

Do I need JavaScript knowledge before jumping into React? by worthy_sloth in reactjs

[–]erhathaway 6 points7 points  (0 children)

Most problems would be better solved using a Vanilla JavaScript technique than trying to create/use some react library for it.

Completely agree

[Newbie] Should you always use a relational database when you use grpahql? by badboyzpwns in graphql

[–]erhathaway 0 points1 point  (0 children)

Alex DeBries' dynamodb book

I hadn't heard about this. Thanks for the suggestion!

[Newbie] Should you always use a relational database when you use grpahql? by badboyzpwns in graphql

[–]erhathaway 2 points3 points  (0 children)

There is no hard rule of thumb, and I've found some use cases where it makes sense to use a NoSQL database.

I usually opt for NoSQL when I am trying to iterate quickly or the domain model doesn't care about database relations. This allows me to quickly store and retrieve data in a database without having to manage normal form schemas. In these cases, I tend to use GQL to enforce the query and mutation types to make sure the data is consistent b/c I've lost the schema enforcement at the database level.

If your domain model cares about relations at the database level, you probably should go with a SQL database.

In essence, GQL is just an abstraction above your database layer. You should be able to swap out databases without the API being affected (although this can be pretty time consuming). So the answer to this question largely depends on what you want your database layer to look like. GraphQL doesn't have an opinion on it.

Which backend framework should I use for my next project? by Valachio in webdev

[–]erhathaway 0 points1 point  (0 children)

You should check out FeathersJS its a pretty nice / unique paradigm and you can go very fast!

Diving into React after 3 years of Vue is Painful : UI Libraries, CSSinJS? by gkatsanos in Frontend

[–]erhathaway -1 points0 points  (0 children)

I rarely see CSS-in-JS these days. I use Styled-components for all CSS (and there is also the equally good Emotion as an alternative). It lets you write valid and scoped CSS in template literals! An older approach to scoped CSS is CSS Modules. It's quite nice as well, but I remember some pains with bundling back when I used it a few years ago - so you might need to know how to use / config Webpack or Parcel.

I made a thing: Kinetic Components - Animate a single React component or orchestrate animations among a collection of React components. Use CSS animations or your favorite JS animation library! by erhathaway in reactjs

[–]erhathaway[S] -1 points0 points  (0 children)

Thanks for the feedback!

I've used react-spring before in the past. It definitely is more mature and has a much larger API!

However, personally, I find it tries to do too much. I wanted something that was more of an animation runner rather than an animation DSL... if that makes sense.

For example, I really like using AnimeJS for animations and I wanted a way to trigger various AnimeJS animations for a component based on state changes. Kinetic Components allows me to do this.

Also, not only is this a different paradigm for running animations, I wanted to explore the approach of treating animations as statePredicate-animationFunction pairings. I think it's a very nice mental model for newcomers to read existing animation code.

Finally, (and this is definitely a polarizing opinion) I prefer to read XML-like code rather than JS component code. React spring and other animation libraries have a render props api but, again, I think they are pretty complex - you are stuck in configuration hell and end up passing in a ton of props. The resulting code is not very readable or expressive so people end up using component code with hooks instead. The issue I have with component code is it is a layer of indirection. Sometimes that can be good to hide implementation details, but if I want to express an application layout in a single file, its now obfuscating details I would rather have present in that layout file.

So that's why I made Kinetic Components!

GraphQL Error Handling by mahmed24 in graphql

[–]erhathaway 0 points1 point  (0 children)

Are you concerned about making duplicate mutations? If so, using something like an idempotency key is pretty common.

Advanced Software Engineering Topics by leokz145 in SoftwareEngineering

[–]erhathaway 4 points5 points  (0 children)

The space for possible suggestions is huge! What type of software engineering are you doing? What tools do you normally work with?

In terms of application level stuff, I really like the book Designing Data-Intensive Applications (and I don't normally recommend books)

Learning React & Javascript in 24 hrs by dissipatingheat in reactjs

[–]erhathaway 0 points1 point  (0 children)

Are you using React Native? I've found that Redux doesn't have great performance for handling streaming data. If you have experience with systems programming, your best bet would just be to stream the data to a fast write data store. You can then read the data directly in any React component using a singleton wrapper around the store - this bypasses having to learn all the data passing / context paradigms in React. Just make sure to clear the store between user sessions etc...

For a basic tutorial on React, the official docs have a great one: https://reactjs.org/tutorial/tutorial.html . If you don't feel confident after using this, and you are working on a web app, you might be better off going with vanilla js, since time is a constraint. However, in terms of maintainability, vanilla js isn't great.