The reducers specify how the app’s state changes in response to actions sent to store. The action only shows what kind of action was made for application but does not give any information about state changes. Reducers is giving information on how to change the state. Reducers is a function that accepts state and actions as arguments, and returns the next state of the application.(prevoiusState, action) => newState

const BUY_PASTA  = ‘ BUY_CAKE ’function buyPasta(){
return {
type: BUY_PASTA,
info : 'First redux action'

You can represent a reducer as previous state and action returning the new…

Actions are just Plain Old JavaScript Objects (POJOs), We will discuss about properties of actions, and how to implement a function to create actions.

What is the Actions

The purpose of the dispatching actions to our store to desirable changes to update our states. In this way, actions almost feel like the request object or the parameters hash that you would see in a web application like Ruby on Rails.

As you remember in Rails, user just clicked a link to have access to controller. They can make changes from controller. But in Redux user may just click the button then button dispatches an…

LifeCycle Component only available in class- based components. You can not use them as a Functional or Presentational Component. Because you have to handle state in the component. We can implement different functions at different times with these components. We can use that when we get our fetch data from the server or do when we need to move something from the DOM. We will talk about how we can use the LifeCycle Component efficiently in our React Application in this article. We will also talk about how we can implement the LifeCycle component in our application as well.


JavaScript ES6 brings us new syntax and some other features to make our life easy. It allows you to write less code and make more. ES6 gives us the ability to provide many features. Strings, class destructions, Modules, arrow functions. Let’s dive in and go for deeper understanding.

const and let

const is a new keyword in ES6 for declaring variables. Const has some difference than var. When we assign anything with const we cant re-assign again. Its immutable variable when it is used with objects.

This is really useful for targeting the selectors. For example, when we have a single button that…

JavaScript has a special syntax for prototypical inheritance model is which called JavaScript classes. JavaScript classes is comparable inheritance in class-based object oriented languages.

JavaScript has a special syntax for prototypical inheritance model which is called JavaScript classes. JavaScript classes are comparable inheritance in class-based object oriented languages.

JavaScript classes are a special function. WhenThe ECMAScript 2015 specification brought a lot of improvements, the largest set of changes the language has seen to-date. Classes are added to ES6. They behave like the class keyword from these other languages. We can make class declarations and class expressions because they are just…

Java scripts have very useful and powerful methods. We can map each in array to something else. A Map object iterates its elements in insertion order — a for or Of loop returns an array of [key, value] for each iteration. From the classic loop like for() or forEach method, There are many techniques and methods for using or iterating datasets in JavaScript. But map method is a popular method. Because the map method creates an array with a callback function on each item from the original array. Map() method is not mutating original arrays. …

In React, we can create multiple components which encapsulate behavior that we need. After that, we can render them depending on some conditions or the state of our application. In other words, based on one or several conditions, a component decides which elements it will return. In React, conditional rendering works the same way as the conditions work in JavaScript. We use JavaScript operators to create elements representing the current state, and then React Component update the UI to match them.

We will have 4 different approaches and we will take a detailed look at each of them

Conditional Rendering

I will talk about inserting a Binary Tree in this article. We will see all the process of inserting in a value on our Binary Tree. In the beginning we have to create a new node, then we should find the correct spot for that new node depending on the value of the number. If you check the diagram you can realize how we can find the right place for our new node in our binary tree.

Let’s say we are planning to add number(15) in our Binary Tree. …

Recursion is one of the difficult techniques to solve Data structure problems. It looks like a loop concept but it’s not easy to understand like how loops work. You can solve some problems with the loops but recursion does not require local variables to maintain local state. Recursion is also easy to write the code and test because they are pure manners. They are returning specific consistent value given input.

Recursion can be used in many situations. But most effective used in solving problems. …

What is tree ?

Trees are very important data structures that collection of nodes just like the linked lists. The differences with linked lists and trees is that trees has parent and child relationships.

The meaning of tree is about the structure of a Binary tree. Basically there are some parent nodes that have some child nodes that give us the direction to reach data easier and faster. Binary Tree structure looks like a tree. This is the reason we call them trees. You can think of a big tree which has many branches and lit splits at some point…

Soner Mezgitci

Software Engineer | Ruby on Rails | JavaScript | HTML5 | CSS | PostgreSQL | React | Redux

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store