Search
Game of Thrones Quiz Game with React and GraphQL: Set up GraphQL Query For the Quiz Questions
17.6.2019
Now we’ll create a component to render the data in the 8base backend. This component will handle the fetching of data using GraphQL queries and will render the fetched data accordingly. To get star
10 React Challenges (Beginner): Render Props
14.6.2019
Render Props allows React components to share reusable or customizable interfaces as functions through props.
In this react challenge, we will render 3 different cards with a single card com
A Practical Use Case for Vue Render Functions: Building a Design System Typography Grid
30.5.2019
This post covers how I built a typography grid for a design system using Vue render functions. Here’s the demo and the code. I used render functions because they allow you to create HTML with a greater level of control than regular Vue templates, yet surprisingly I couldn’t find very much when...
10 Web Performance Audit Tips for Your Next Billion Users in 2018: Render-Blocking Styles
28.5.2019
CSS files are rendered while rendering the actual document, not after. For this reason, the document has to wait for the CSS to be parsed and interpreted before anything is shown on the screen. The
10 Web Performance Audit Tips for Your Next Billion Users in 2019: Render-Blocking Styles
28.5.2019
CSS files are rendered while rendering the actual document, not after. For this reason, the document has to wait for the CSS to be parsed and interpreted before anything is shown on the screen. The
A CSS Golfing Exercise
6.5.2019
Code golfing is a type of programming where the goal is to accomplish a task using as few bytes as possible. CSSBattle is a code golfing battleground where players complete to recreate target images using CSS and HTML.
The rules are fairly simple:
No external resources (sorry, no <img...
Intro to React Hooks
18.1.2019
Hooks make it possible to organize logic in components, making them tiny and reusable without writing a class. In a sense, they’re React’s way of leaning into functions because, before them, we’d have to write them in a component and, while components have proven to be powerful and functional...
Using React Portals to Render Children Outside the DOM Hierarchy
15.1.2019
Say we need to render a child element into a React application. Easy right? That child is mounted to the nearest DOM element and rendered inside of it as a result.
render() {
return (
<div>
// Child to render inside of the div
</div>
);
}
But! What if we want...
Rendering Lists Using React Virtualized
13.12.2018
Working with data in React is relatively easy because React is designed to handle data as state. The hassle begins when the amount of data you need to consume becomes massive. For example, say you have to handle a dataset which is between 500-1,000 records. This can result in massive loads and lead...
Building “Renderless” Vue Components
20.7.2018
There's this popular analogy of Vue that goes like this: Vue is what you get when React and Angular come together and make a baby. I've always shared this feeling. With Vue’s small learning curve, it's no wonder so many people love it. Since Vue tries to give the developer power over components...
Render Children in React Using Fragment or Array Components
17.7.2018
What comes to your mind when React 16 comes up? Context? Error Boundary? Those are on point. React 16 came with those goodies and much more, but In this post, we'll be looking at the rendering power it also introduced — namely, the ability to render children using Fragments and Array...
The div that looks different in every browser
13.7.2018
It's not that Martijn Cuppens used User Agent sniffing, CSS hacks, or anything like that to make this quirk div. This is just a plain ol' <div> using the outline property a la:
div {
inset 100px green;
outline-offset: -125px;
}
It looks different in different browsers because browsers...
What does the ‘h’ stand for in Vue’s render method?
30.5.2018
If you’ve been working with Vue for a while, you may have come across this way of rendering your app — this is the default in the latest version of the CLI, in main.js:
new Vue({
render: h => h(App)
}).$mount('#app')
Or, if you’re using a render function, possibly to take advantage...
Understanding React `setState`
25.4.2018
React components can, and often do, have state. State can be anything, but think of things like whether a user is logged in or not and displaying the correct username based on which account is active. Or an array of blog posts. Or if a modal is open or not and which tab within it is active.
React...
Force a React Component to Re-Render
7.3.2018
The beauty of React components is that they automagically render and update based on a change in state or props; simply update the state from any place and suddenly your UI element updates — awesome! There may be a case, however, where you simply want to brute force a fresh render of a React...