Ramda By Example 3: Lenses

preview_player
Показать описание
In this video, we'll write a function to handle the change events on the checkboxes in our React component, using Ramda all the way. We'll look at lenses, a great functional construct that makes it simple to reach inside complex objects and make small changes.

Рекомендации по теме
Комментарии
Автор

You are very clear speaker, good job. I have experimented with Ramda also and I liked it a lot. It's hard to break out of the imperative mindset. I think this style of programming is going to be very important in the future.

flamingwoodz
Автор

It only seems like it’s overly complex because we’re not seeing functions that are repeatable. A lot of these tutorials are contrived in order to hit key points. I think what would help FP shine in JavaScript is to identify repeatable, pure functions with regards to your application and then abstract those into some app.functions.js file. That way your event handlers can only be a few lines of code.

MrPlaiedes
Автор

Seems super complex for such a simple job.

metalwarrior