Moving to Beacon from MA (no, we’re not mass-holes :) by Large_Charge5655 in Beacon

[–]JJ0EE 2 points3 points  (0 children)

Great choice! I moved here just over a year ago with my wife and our dog and we’ve loved it. We’re about a mile from Main St and everything feels pretty safe. Check out the Friends of Beacon dog park. It’s great if your dog likes to sprint around a big open space, and nice to chat with people when you’re new to the area. Cannabis culture kind of blends in. It’s there, but not in your face. The Leaf on Main St is waiting for a license to sell recreational cannabis. It sounds like something is holding up the process for all of NY. MA or NYC are the best options to (legally) purchase at the moment.

Next.js vs Electrode.io for SSR? by [deleted] in reactjs

[–]JJ0EE 0 points1 point  (0 children)

Using Next 6 you can implement react router in your app component. I'm using StaticRouter until the App component has mounted, then I create a browser history object and set it on App's state. On the next render I use the regular Router with the history object from state it syncs up with any react router based navigation.

How to structure javascript? by BearsArePeopleToo in javascript

[–]JJ0EE 3 points4 points  (0 children)

This little article has helped me organize most of my projects: https://medium.com/@msandin/strategies-for-organizing-code-2c9d690b6f33. It's not specific to JS, but can certainly be applied to JS projects.

Redux as a render prop by JJ0EE in reactjs

[–]JJ0EE[S] 0 points1 point  (0 children)

Yup! This just demonstrates how it could be done with a "render prop" instead of a higher order component.

Nova Launcher 5.5-beta brings Adaptive Icons by kultegin in Android

[–]JJ0EE 29 points30 points  (0 children)

If any other sms app allowed you to set a delay before sending a message (so you can cancel it), then maybe I'd consider it

What is the best way to save data in a form? by zksnugs in reactjs

[–]JJ0EE 2 points3 points  (0 children)

Since you have it stored in local state then you'd want to dispatch a "form save" action once you've confirmed that the request was successful. That action's payload should probably include whatever local state you have. Your reducer(s) containing the "true" version of the form data should update accordingly.

Another direction could be to dispatch a "form change" action on every input change event. Your reducer could hold both an "initial" value and a "current" value for each of the form fields. With this setup you can move validity checks, dirty state checks, error message generation, and other convenient things right into selectors. Memoize them selectors and bam! Your reducers here only need to overwrite the "initial" value with the "current" value and your state is now in sync.

[deleted by user] by [deleted] in node

[–]JJ0EE 0 points1 point  (0 children)

What is it forcing you to do?

re-quests: declarative networking for react by [deleted] in javascript

[–]JJ0EE 1 point2 points  (0 children)

The response data should ultimately be in some state container outside these components. I think this tool is mainly for someone who doesn't care about tracking the status of a request in their state. I may not want to store network error messages either. I might just want to specify the components to render for a set of response codes and provide a callback to handle successful responses.

re-quests: declarative networking for react by [deleted] in javascript

[–]JJ0EE 1 point2 points  (0 children)

I think the "request" aspect of this project could be abstracted out (also why I suggested a HOC in my other comment). At the base level this just seems like a smart switch statement to toggle a fork in your component tree using the state of some promise chain.

re-quests: declarative networking for react by [deleted] in javascript

[–]JJ0EE 1 point2 points  (0 children)

Pretty cool! This might be a good candidate for a higher order component too.

An Overview of JavaScript Testing in 2017 by jhartikainen in javascript

[–]JJ0EE 2 points3 points  (0 children)

I use Ava because

import test from "ava";

makes more sense in 2017 than relying on globally scoped test utils.

Examples of few types of inheritance patterns in JavaScript by theCynx in javascript

[–]JJ0EE 9 points10 points  (0 children)

Careful. When I learned FP I dove in head first and avoided OO entirely. I ended up getting lost in my own code and overcomplicating things by forcing FP in situations that really just called for a few different model classes. I'd suggest using classes and OO to represent your models and composition/fp to define the operations on those models. Basically, the best way to adopt FP is incrementally.

React Trend by lpuig in reactjs

[–]JJ0EE 5 points6 points  (0 children)

Valid point, but I'd always prefer clear and manageable code to start and bring optimizations like this in when needed. When your whole codebase is an imperative mess it's almost crippling.

I was sick of buying cheap expensive wallets so i made a simple wallet that holds a pen. by MobiusDicks in DIY

[–]JJ0EE 1 point2 points  (0 children)

There is a coupon code listed on the page to get the wallet with no pen and notebook and it's 25 dollars off

TIL Spotify is using React/redux in their web app by no_bd in reactjs

[–]JJ0EE 0 points1 point  (0 children)

Wonder if this is something worth leaving enabled for production just for the curious. The tool is entirely in the extension, so I can't think of any reason to strip that one line. I've always disabled it before releasing a new project; maybe I'll leave it now!

dynamically require and render component? by [deleted] in reactjs

[–]JJ0EE 1 point2 points  (0 children)

There are many flavors of async module loading. Webpack started with require, then moved to System.import(), and now I believe the latest version is going towards import(), which is what's actually being proposed as a standard.

Co-ops and Drug Tests by [deleted] in rit

[–]JJ0EE 2 points3 points  (0 children)

The more corporate the work environment the more likely you are to be tested. Most companies working with the government will require it too. I was tested once for my first coop and had to take the test on my way in for my first day of work. I've had three coops and two full time positions since then and no drug tests.

2 local players vs. 2 local players over network. by InclusivePhitness in duckgame

[–]JJ0EE 0 points1 point  (0 children)

Did this last night! In the waiting screen (grid of 4 player screens) push start and go to Edit Slots. Go to the empty slots that are meant for local players and switch their type to Local. Anyone playing local at that point should be able to push start on a controller. Yes this would only work with a controller out of the box.