teleren/devto huggingface dataset:
Recompose but with React Hooks!
Tags: react, javascript, package, library
Published: 2019-02-06 18:17:59

---

title: Recompose but with React Hooks!
published: true
description: The recompose pattern was great, but with Hooks, it's no longer being updated with new features. Re-Enhance takes the patterns of recompose, but with hooks!
tags: React, Javascript, Package, Library
---
![Hooks](https://thepracticaldev.s3.amazonaws.com/i/1civ4uqhdt583nfk6l6r.jpg)

When hooks were announced, I immediately looked to the library recompose to see if it was going to be updated with some hooks.

Unfortunately, the library was to be discontinued..

I decided to take the patterns of Recompose and translate them using Hooks.

### The result: Re-Enhance


```
npm install re-enhance
```

```
yarn add re-enhance
```


## Usage


```js
import { pipe, usePropMapper, useStateEnhancer /* ... */ } from 're-enhance'
```

#### Recompose

```js
const BaseComponent = props => {...}

const enhance = compose(
  withState(/*...args*/),
  mapProps(/*...args*/),
  pure
)
const EnhancedComponent = enhance(BaseComponent)
```

#### Re-Enhance

```js
const useEnhancer = pipe(
    useStateEnhancer(/*...args*/),
    usePropMapper(/*...args*/),
    /*pure cannot be hooked 😔*/
)

// But you can use memo!
const BaseComponent = React.memo(props => {
    const enhancedProps = useEnhancer(props)
    // ...
})
```
#### Example

```js
import React from 'react';
import { pipe, useHandlers, useStateEnhancer } from 're-enhance';

const useEnhancer = pipe(
    useStateEnhancer('counter', 'setCounter', 0),
    useHandlers({
        inc: ({ setCounter }) => () => setCounter(counter => counter + 1),
        dec: ({ setCounter }) => () => setCounter(counter => counter - 1),
    }),
);

function Component(props) {
    const { counter, inc, dec } = useEnhancer(props);
    return (
        <div>
            <button onClick={inc}>Inc</button>
            {counter}
            <button onClick={dec}>Dec</button>
        </div>
    );
}

export default Component;
```

## Feedback wanted

Due to the limitations of Hooks, `recompose` could not be totally ported using React Hooks. However, I may add some of the HOC's to this project for convenience!

If you think that more Hooks can be added, feel free to contribute! 🎉🎉



### Check it out!

#### [Re-Enhance](https://github.com/cevr/re-enhance)
Dev.to Review #14: Top 7 Of The Week, Discussed
Tags: bestofdev, career, discuss, webdev
Published: 2019-02-06 17:15:14

---
title: Dev.to Review #14: Top 7 Of The Week, Discussed
published: true
description: Two devs get together to discuss the week's Top 7 posts on dev.to
tags: bestofdev, career, discuss, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/auy2hgrm1l8ecxmol6s5.jpg
canonical_url: https://soundcloud.com/malikanddan/devto-review-episode-14
series: DEV.TO Review
---

> If you'd like to follow us on iTunes instead of waiting for these posts, check that out [over here!](https://itunes.apple.com/us/podcast/dev-to-review/id1444162833?mt=2) While you're on iTunes, feel free to drop a review, we'd really appreciate it - it'll help us grow, and become more discoverable on the platform  (Malik made me write this). 
If you'd like to see a full archive without clicking around the series, check out this [nifty thing](https://overcast.fm/itunes1444162833/dev-to-review) that Overcast automatically created. If you want the direct RSS link, you can grab it [here](https://pcr.apple.com/id1444162833).

We're back! Malik and I are here again to discuss this week's Top 7 Articles on dev.to!

{% soundcloud https://soundcloud.com/malikanddan/devto-review-episode-14 %}

Did you follow along with the debate over *The Great Divide*? 

Have you taken apart monoliths? Has it worked?

Are you tired?

Let us know in the comments, or, drop us a line with any thoughts or topics you want to hear discussed at our new email: <a href="mailto:devtoreview@gmail.com?subject=My Question for the DEV.TO Review">devtoreview@gmail.com</a>!

This week's discussed posts are:

{% link https://dev.to/ulitroyo/why-everyone-is-fighting-about-cssux-and-js-4cpp %}
{% link https://dev.to/mkrl/apis-you-didnt-know-you-needed-38c %}
{% link https://dev.to/aspittel/css-from-zero-to-hero-3o16 %}
{% link https://dev.to/jamesmh/whats-the-difference-between-a-senior-and-lead-developer-1pl2 %}
{% link https://dev.to/kylegalbraith/how-to-breakthrough-the-old-monolith-using-the-strangler-pattern-63e %}
{% link https://dev.to/marek/three-arguments-for-why-you-should-write-more-1no6 %}
{% link https://dev.to/burdettelamar/retired-apparently-1210 %}


> We're still experimenting with post formats, audio, feedback loops, etc., so if you have any thoughts, feel free to let us know on here, or on Twitter at [@dangolant](https://twitter.com/dangolant) and [@milkstarz](https://twitter.com/milkstarz).
The Pull Request Checklist
Tags: discuss, help, career
Published: 2019-02-06 16:37:06

I have this idea of making a checklist for our developers so we can keep our engineering standards high. Currently the checklist is pretty slim and I'm looking for more ideas which can be added.

* Every third-party call is:
  * Done by a circuit breaker
  * Limited by time
  * Handles properly errors
* Every promise / callback / async handles properly errors
* Every edge case is covered by test(s)
* No assumptions about data integrity / consistency were taken
* Potential performance pitfalls were considered
* Commit messages follow the convention


Of course our development methodology is much broader but in this list I want to keep only the most important things.


Thanks :)
React Hooks Released! (Finally 🎉)
Tags: react, webdev
Published: 2019-02-06 16:28:16

After a lot of waiting...
{% twitter 1092920897143521287 %}

We finally have React with Hooks to use! https://reactjs.org/blog/2019/02/06/react-v16.8.0.html

I also created a custom hook to use scroll position last month: {% github neo/react-use-scroll-position %}
pgAdmin - PostgreSQL Tools
Tags: postgres
Published: 2019-02-09 15:14:36

---
title: pgAdmin - PostgreSQL Tools
published: true
tags: PostgreSQL
canonical_url: https://www.pgadmin.org/
---

[PgAdmin](https://www.pgadmin.org/). 

This has been around for a while, but it is completely new to me. It was really helpful this morning when I was working on adding limits to my recursive queries.

<!--more-->

See, [Unlimited Software Does Not Exist](https://dev.to/scottw/unlimited-software-does-not-exist-3fec-temp-slug-9237582)
Unlimited Software Does Not Exist
Tags: software, bugs
Published: 2019-02-06 22:14:32

---
title: Unlimited Software Does Not Exist
published: true
tags: [software, bugs]
canonical_url: https://scottw.com/limits
---

In software, nothing is unlimited. You can market and sell your product _without any limits_, but when it comes to computing, **there are always limits**.

One such limit, bit me in the ass yesterday.

KickoffLabs uses recursive queries in a couple of places. These are great because they can often limit hops back and forth to the database. Generally, they recurse two or so levels deep.

Unfortunately, a customer (or customer’s customer) managed to go many levels deep….and you probably guessed it by now, without any limits. Furthermore, one of these queries generates more related recursive queries.

![Oh no! When things went wrong](https://scottw.com/assets/images/posts/limits.png)

The green in the picture is database work. It was not the number of queries causing the problem, just the amount of work they were doing. These queries in turn started to push everything else back, exhaust connections, etc….a fun time for all.

The good news is overall the system held up quite well. For a couple of hours our response time was over our desired limits, but we were still very much operational.

We now have a limit in place on the depth of our recursive queries.

These bugs frustrate the bajeebus<sup id="fnref:1"><a href="#fn:1">1</a></sup> out of me. It is so obvious once you see it and it I borderline preach always having some limits.

As penance for my sins against computing, I could not sleep last night, and I ended up starting on the real fix at 2 am.

If you have a moment, look around your code and see if there is something which needs some a ‘just in case’ limit.

1. 

I got to use the word bajeebus…it is all worth it. ↩︎
Most Popular Development Posts Of The Week (06 February 2019)
Tags: javascript, react, backend, frontend
Published: 2019-02-07 13:20:37

---
title: Most Popular Development Posts Of The Week (06 February 2019)
published: true
tags: javascript,react,backend,frontend
canonical_url: https://medium.com/daily-now/most-popular-development-posts-of-the-week-06-february-2019-9aceb11fadfc
cover_image: https://cdn-images-1.medium.com/max/1024/1*t0EdFkkOd_3xNL09NDGTnw.jpeg
---

> Don’t play games that you don’t understand, even if you see lots of other people making money from them

- [APIs you didn’t know you needed](https://app.dailynow.co/r/ba511ce84290eb1e4de4deea14e94110)
- [Learn Web Development in 2019](https://app.dailynow.co/r/8c8c977f73577bdddf788772e71d34b9) by [Trey Huffine](https://medium.com/u/47e700e59e44)
- [Funny memes of everydays coders life](https://app.dailynow.co/r/6273c88e58e2c27b919f42a4d963eb77)
- [11 Awesome JavaScript Extensions for Visual Studio Code](https://app.dailynow.co/r/e3bc71ce699b3f7260187acb5b37a899)
- [How Do Software Engineers Choose Which Front End Framework To Use](https://app.dailynow.co/r/c3df22ffd0696093ed6a1802cc4b9723)
- [Awesome List of Developer Podcasts](https://app.dailynow.co/r/33dbf3cd71d2a433c4ed9d55ed17cebc)
- [I put 18 event handlers on a React element](https://app.dailynow.co/r/1cc4bcfcd9daeace464efd4e7d422c82)
- [H2O for Inexperienced Users](https://app.dailynow.co/r/87579eed49116fccb4c9879cc6fd46f7) by [Abhay Singhal](https://medium.com/u/e8eb169d0c64)
- [Top 30 Data Visualization Tools in 2019](https://app.dailynow.co/r/7e66fac483e8123cc92298f6fa20aa08)
- [The “Backendification” of Frontend Development](https://app.dailynow.co/r/827567ab910bea8d682596a6a82ccb16) by [Mike Taylor](https://medium.com/u/d8dc491ddf49)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

![](https://cdn-images-1.medium.com/max/1024/1*m8Uf-6F4Q5AOp_wW6tbKSQ.jpeg)
A little story about Javascript Protoype
Tags: javascript
Published: 2019-02-06 13:59:19

---
title: A little story about Javascript Protoype
published: true
description: On Javascript every object will delegate to its prototype on failed lookups. In other words, If an object doesn't have a prop or method, then check its prototype.
tags: javascript
---
# A little story about Javascript Protoype

On Javascript every object will delegate to its prototype on failed lookups. In other words, If an object doesn't have a prop or method, then check its prototype.


![A little story about Object Protoype](https://thepracticaldev.s3.amazonaws.com/i/liv12igo7u6ewiqf04ss.png)
Ask the community for a post
Tags: requestforpost, meta
Published: 2019-02-06 13:43:36

DEV's community is full of people enthusiastic about a wide range of different topics and others who would like to dedicate more of their time to blogging about software development.

Thanks to @jess and the DEV team now there's an official tag to nudge each other:

{% tag requestforpost %}

You can use it to request a post from the community, to send your wishes out there, to gift ideas about topics you would like to write about but don't have the time presently, to ask for a different take on topics you know about or anything else you might come up with.

The difference between this and `#explainliveimfive` is the following:

{% devcomment 7pfb %}

Hopefully the subtle difference is noticeable...

A few sample ideas from the tag sidebar and one more reminded me by @helenanders26:

* The browser of the future as a far reaching and comprehensive developer platform
* "A day in my professional life" (asking a specific professional who does a job totally different from yours, for example)
* Fantastic concurrency models and when to use them
* Window functions and why they are the single most powerful feature in modern SQL

Ask away!
Nested Loops Bow-Out
Tags: javascript, music
Published: 2019-03-02 16:17:48

---
title: Nested Loops Bow-Out
published: true
tags: javascript, music 
canonical_url: https://www.kahlillechelt.com/2019/02/06/nested-loops-bow-out/
---

As you may know, I am a member of the JavaScript band [Nested Loops](https://nestedloops.github.io/). We performed on the last three opening performces of [JSConf.eu](http://jsconf.eu/).

We will not be performing at JSConf.eu this year.

It was a great honor and privilege for us to be able to do that and we are thankful for the opportunity.

We produced original music for the conference and performed it in a browser. If you want, you can re-live of our performances [on YouTube](https://www.youtube.com/results?search_query=jsconf+eu+nested+loops). And you can listen to our story on the Changelog podcast [here](https://changelog.com/jsparty/52).

I have no idea if we will ever perform again at JSConf.eu or any other event.

If you want to talk to us about performing at your JavaScript conference or any other event, or if you needs some original music just [drop me an email](mailto:hello@kahlil.info) or DM me on [Twitter](https://mobile.twitter.com/kahliltweets).
Pack of more than 1000 beautiful open source icons on Vue
Tags: vue, icons, githunt
Published: 2019-02-06 13:03:55

---
title: Pack of more than 1000 beautiful open source icons on Vue
published: true
description: Pack of more than 1000 beautiful open source icons on Vue
tags: vue, icons, githunt
---

![](https://thepracticaldev.s3.amazonaws.com/i/2ckkzucushgnrseljmsm.png)

Vue Unicons is a pack of more than 1000 beautiful open source [unicons](https://github.com/iconscout/unicons) as Vue components.

Icons are divided into categories for convenience.

Enjoy! 🙂

https://antonreshetov.github.io/vue-unicons/
What are the most suitable datastores for storing a huge number of articles and news?
Tags: bigdata, nosql, cassandra, elasticsearch
Published: 2019-02-06 11:43:57

---
title: What are the most suitable datastores for storing a huge number of articles and news?
published: true
description: 
tags: big data, nosql, cassandra, elasticsearch
---

I am assigned to a new big project at my current company. The project will collect a huge number of news articles from different sources.

The whole requirements still not clear but we can expect some of it. For example,

Building some dashboards to display some statistics about the collected news.
Full-text search (exact, fuzzy, and synonym)
Providing a way to other teams (specifically data analysis team) to query the data.

**What would you suggest as a datastore for such a project?**

I believe there is no one-size-fits-all solution to this type of project.

As a start, I am thinking in using *Elassandra* as it combines both *Cassandra* and *Elasticsearch* which may satisfy the first two points (*Cassandra* for aggregation and analytics and *Elasticsearch* for full-text search).

Still the third point not satisfied. The data analysis people are familiar more with *SQL* which will not be 100% provided by either *Cassandra* or *Elasticsearch*.

The other approach I am thinking in is to have another storage for the analysis team and the application responsible for writing the data will write it to both storages.

What do you think?
Thoughts on Losing Steam in Things You Love To Do
Tags: career, motivation, passion, life
Published: 2019-02-06 10:33:48

---
title: Thoughts on Losing Steam in Things You Love To Do
published: true
description: Sharing my experience on burning out in programming two years ago
tags: #career, #motivation, #passion, #life
cover_image: https://thepracticaldev.s3.amazonaws.com/i/nztx51k7zsb5yzpbt77w.jpeg
canonical_url: https://chrishustler.life/thoughts-on-losing-steam-in-things-you-love-to-do/
---

> This post is originally published on my blog [Thoughts on Losing Steam in Things You Love To Do](https://chrishustler.life/thoughts-on-losing-steam-in-things-you-love-to-do/) 

I remember 4 years ago when I’m still a fresh graduate of Computer Science degree. I was so excited to start working ‘cause it feels like I would be able to learn a lot and I’m so excited to apply why I learned on college in coding and programming.

My first work gives me some sort of authority and flexibility to explore a lot of technologies. It’s a company that provides design and development to other business ‘**also known as dev shop**’. Everything seems good at the beginning since you are learning a lot.

At some point, I hit the plateau with regards to skills and everything starts to become repetitive, and the things I used to love to do (coding and building things) become such a drag that I no longer enjoy doing it at that time. I think it was something to do with repetitive work and if it’s no longer **‘spark joy’** in you.

I couldn’t believe that the things that you used to love before start to become things you hate the most. It no longer brings joy and you are only doing it for the sake of surviving(money). It was me when I finished my first corporate.

That event triggers something in me which makes me curious if there are other things out there. I start to explore other things. Then I found the world of freelancing, startup, business, and entrepreneurship. It really blows my mind at the time. Thanks to my endless curiosity. It really changes the way I see the world.

In investing world there is term diversifying wherein it’s not good to put all your money in one basket ‘cause if your selected stock goes down you will suffer a lot. It was good to spread it on some other asset. I try to apply it with things that bring happiness to me. Besides coding I’ve learned other things such as writing, playing guitar. Although I’m not world-class at those skills I’m good enough to satisfy myself when I get bored on doing one specific skill.

It would be nice to have a clear distinction between a skill that satisfies your financial needs, and other skills that satisfy your soul.

Now, I start to love coding again since I've found a higher purpose on doing it. Plus, I've got a different skill that compliments it well which is this writing and designing. I’m combining those skills that I’ve acquired through time in creating and building things on my own. While still using some of my skills to earn money.
Between Xamarin and ReactNative which one would be a better choice for creating Mobile Applications
Tags: devdiscuss, mobile, xamarin, reactnative
Published: 2019-02-06 10:31:05

---
title: Between Xamarin and ReactNative which one would be a better choice for creating Mobile Applications
published: true
description: 
tags: devdiscuss, mobile, xamarin, reactnative, 
---

I'm a developer and  the tools or tech stack I'm comfortable consists of using C#, ASP.NET, SQL, Entity Framework, SignalR, JavaScript(Angular, React), and TypeScript.

I've already done several pet projects on Xamarin(mainly on forms as of now, but I'm thinking of working on iOS and Android as well.....) it's actually cool that I'm able to create mobile applications using C# with Visual Studio, however I'm intrigued with ReactNative specially moving forward as it seems that more developers are favoring it over Xamarin, so I would like to know your experience with either Xamarin or ReactNative and which one would you choose and why?
lodash find by object property
Tags: todayisearched
Published: 2019-02-06 09:34:57

---
title: lodash find by object property
published: true
description: lodash find object by its property
tags: #todayigoogled
---

Have you ever figured how to get array of object from its property with single line? then try use **lodash/find**

```bash
npm install lodash/find # or yarn add lodash/find
```

```javascript
import find from 'lodash/find'

const obj = [
  { name: 'vico', level: 1 },
  { name: 'ben', level: 99 }
]

const vico = find(obj, ['name', 'vico'])

console.log(vico)
// output: { name: 'vico', level: 1 }
```
Awesome .NET Security
Tags: showdev, dotnet, security, githunt
Published: 2019-02-06 09:22:18

---
title: Awesome .NET Security
published: true
description: An awesome list of security-related resources for .NET
tags: #showdev, #dotnet, #security, #githunt
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hptdiahadbwvatanmp0l.png
---

Hey Devs, do you like #dotnet and #security?

Then you might 💖 this curated list of **awesome-dotnet-security** resources to help fortify .NET code.

{% github https://github.com/guardrailsio/awesome-dotnet-security %}

Did I miss anything? Let me know in the comments.

And, please leave a like (or ⭐ the repo) if you find it useful.
My free software and open source activities of January 2019
Tags: classicpress, mozilla, opensource, participation
Published: 2019-02-14 11:00:28

---
title: My free software and open source activities of January 2019
published: true
tags: ClassicPress,Mozilla,Open Source,Participation
canonical_url: https://daniele.tech/2019/02/my-free-software-and-open-source-activities-of-january-2019/
---

What is happened this (past) month? In the meantime to read the previous report go here.

The post [My free software and open source activities of January 2019](https://daniele.tech/2019/02/my-free-software-and-open-source-activities-of-january-2019/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
Moving away from Google
Tags: google, privacy
Published: 2019-02-08 18:33:02

---
title: Moving away from Google
published: true
tags: Google, Privacy
canonical_url: https://miguelpiedrafita.com/moving-away-from-google/
cover_image: https://images.unsplash.com/photo-1533228100845-08145b01de14?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ
---
{% blogcast 293 %}

Concerned about Google's monopoly and approach to privacy, I've decided to take some steps towards ungoogling my life. Here are some alternatives to Google products:

## Browser

This is the easiest part but also one of the most difficult ones. If like me you've used Chrome all your life, switching to [Firefox](https://firefox.com) may be super hard. Fortunately, there's an alternative. [Ungoogled Chromium](https://github.com/Eloston/ungoogled-chromium) is a fork of Chrome that removes all the google stuff from chrome. It comes with a downside tho, you'll need to follow a specific procedure to install new extensions.

## Google+

I was actually surprised by the reaction to the shutdown announcement. Turns out someone was using it! Anyways, if you were one of those people, I'd suggest you [Twitter](https://twitter.com/m1guelpf) or [Mastodon](https://joinmastodon.org/).

## Google Search

Use [DuckDuckGo](https://duckduckgo.com). And if those "your data shouldn't be for sale" popups annoy you, use [DuckDuckGo StartPage](https://start.duckduckgo.com/). Missing some results? Prepend `!g` to your query and you'll get the same results you'd get with Google.

## Google Drive, Docs, Sheets & Slides

For Drive, you can use [Dropbox](https://dropbox.com), or [Nextcloud](https://nextcloud.com) if you have a server to host it on. The best alternative I've found for Google Docs is [Notion](https://notion.so). For slides, you can use [slides.com](https://slides.com), and [Airtable](https://airtable.com/) is a good alternative to Sheets.

## Gmail

Another tough one. The best alternative I've found is [Zoho Mail](https://www.zoho.com/mail/) (which also allows custom domains for free), but you can also try [ProtonMail](https://protonmail.com/).

## Google Analytics

I've been using [Fathom](https://usefathom.com) for a while now on all my websites and I'm loving it, though I've been also hearing good things about [SimpleAnalytics](https://simpleanalytics.io/).

## Other

Pieter Levels made [a website](https://nomoregoogle.com/) listing alternatives to all Google products.