WordPress custom admin page

When you write your own plugin, you often want to add dedicated page for its settings. In this post I will show you how to do this.

Read more

How to use ajax in WordPress – on frontend and admin side

Ajax ( Asynchronous JavaScript and XML ) allows us do action in asynchronous way – without page reloading. It is very useful and has affect on better user experience. We can for example add, hide or delete some content from site and there’s no need to reload whole page.

Read more
jQuery infinite scroll image gallery

jQuery infinite scroll image gallery

Infinite scroll gallery is a simple and difficult task at the same time. It all depends on how you want to display it. For start, let’s write the basic assumptions:

Read more

React Hooks – useMemo hook example

UseMemo hook returns memoized value. That’s why you can use it to optimize performance of your app. If you have large calculations to get value that you need, you can do it only once and use useMemo hook to remember this value.

Read more

React Hooks – useRef hook example

UseRef hook can be used in two ways. First, it allows to directly access to DOM element, so we can manipulate it. Second, it can keep any mutable value in its .current property, that is not change between renders.

Read more

React Hooks – useEffect hook example

UseEffect hook runs after first render and after every other completed render (but we can change that, so it can runs after first render and only when certain values have changed). We may put in it piece of code, that runs after component render, so we can change state or manipulate DOM tree before it […]

Read more

React Hooks – useContext hook example

UseContext hook provides a way to pass data through the component tree without having to pass props down manually at every level. It helps maintaining cleaner code. In other words – it provides a way to share values between components without having to explicitly pass a prop through every level of the tree.

Read more