Tagged “javascript”
-
How to resolve Jest issues: tests passing, but code coverage fails!
This post is about javascript jest react testing library
Today I'm continuing with my trend of making silly mistakes so you don't have to. The subject today is asynchronous tests in Jest. I've spent too much time on this one, and I don't want you to have the same trouble!
Written on -
What should I use to build my new project?
This post is about javascript
There are so many choices when it comes to frameworks, and that's teriffic! But it could be bad news for people who struggle to make decisions. They might feel paralyzed just by the amount of choice that's on offer. So I made this with the aim of helping.
Written on -
Why Astro matters
This post is about javascript
Next, Nuxt, Gatsby, SvelteKit ... there's been an explosion of frontend application frameworks lately. It's never been a more delightful experience to spin up a new project. What's the point of difference with this one? Why does it 'matter' so much?
Written on -
React: data fetching results in type error: object is not a function
This post is about javascript indigotree
Sometimes I get frustrated with React, there can still sometimes be obscure errors that are a result of it's component lifecycle methods. But at least it means I can tell you about how to avoid them ...
Written on -
Lowest tech first
This post is about javascript
Should I use CSS or JavaScript to perform this task? If you're asking yourself this question, I have an answer for you: use the lowest technology available to you which can complete the task.
Written on -
First steps with Sveltekit
This post is about svelte javascript
SvelteKit is great for one reason: performance. And it's this above everything else (except accessibility) that I'm excited about.
Written on -
Should I use ternary or the logical and operator?
This post is about javascript react
Templating with JSX in React is easy ... until it's not. Recently a colleague recommended I use the logical and operator instead of a ternary. However once we'd dug into it a little, we found these operators do very different things ...
Written on -
Predictions for GatsbyConf 2021
This post is about gatsbyjs nextjs javascript
It's no secret that NextJS is knocked the socks off Gatsby last year in terms of developer adoption. I think the frameworks will keep learning from each other (read: steal features), and it's a good thing for both frameworks. Here's my take on what could be announced at Gatsby's forthcoming conference.
Written on -
Automated accessibility testing is great, but ...
This post is about javascript testing accessibility
We recently had a situation using jest-axe in tests, where the landmarks feature wasn't work as expected. This helped me verify why we shouldn't rely solely on automated tools, never mind how good they are.
Written on -
The JavaScript CMS Landscape
This post is about javascript cms content management
I've been keenly interested in a specific subset of CMSes since about 2 years ago, when it became clear that Zopa would soon need to invest in one, and that I would be involved in choosing something that would be a good fit for the company. This post is a roundup of some of the great products available, and is the result of some of the research and proofs-of-concept I have made.
Written on -
Three UI Component Conundrums
This post is about javascript computer science
I really like using React with Styled Components for building effective user interfaces. However I have recently come across three conundrums to solve.
Written on -
Publishing both JS and non-JS sites
This post is about performance javascript
It's always bothered me that the majority of internet users spend a lot of money downloading and running JavaScript, yet I enjoy building things with JavaScript, and want to provide an enhanced experience using JS ... without sacrificing their needs to do so. Now, there's an easier way to do both.
Written on -
Comparing two redux setups
This post is about javascript react redux
I recently came across two different examples of setup that used Redux to manage state in a sample app. They were so different that I thought it was worth delving a little deeper into why, and how we can write Redux code so it's a good fit for our needs.
Written on -
Dynamic client side routes in GatsbyJS
This post is about javascript gatsbyjs
Would you use GatsbyJS for a dynamic app? Yes I would. The reason is that I can make good use of Gatsby's great developer experience, as well as do everything I would normally do in a React application. Here's how I recently implemented dynamic routing.
Written on -
What is Typescript?
This post is about javascript typescript
I had this discussion with a friend over Slack recently, and wanted to share it here in case I wanted to help someone else with the concept in the future
Written on -
Creating my homepage animation
This post is about javascript
I made the original animation for this site when I was using Hugo, but it's taken some time to refactor to React. Here's the story of how I achieved that.
Written on -
How to test JavaScript API Calls
This post is about javascript testing
In the January 2020 issue of Net Magazine, we walked through how to use React testing library to write basic unit tests for your React components. In this article I'm going to dive a little deeper and show how to write tests for some code that fetches data from an API.
Written on -
On website longevity
This post is about javascript
When you build something, how long do you expect it to last? Whilst it might be easy to think about the things we create as our legacy to the world, that might not be the case when it comes to our online creations ...
Written on -
How to scope Typecheck to your project folder
This post is about javascript typescript
Typecheck should only run against the code you write for your project, but I found it's not that obvious to configure that...
Written on -
Published Article: Unit Test your React apps
This post is about performance netmag articles javascript published articles
Want production-ready code without going to production first? This article shows how it's possible with React Testing Library. This article was originally published in Net Magazine.
Written on -
Published Article: Getting Started with TypeScript
This post is about netmag articles published articles javascript
TypeScript. You either love it, or hate it ... or are terrified of it. But it could be a valuable tool that benefits your workflow. This article, originally published in Net magazine, shows you how to get started with TypeScript
Written on -
The Art of Compromise
This post is about professionaldevelopment javascript
Working as part of a larger team often involves skills that aren't readily taught as part of a person's development career. But they are essential if you're going to be developing software as part of a team.
Written on -
Normalizing data using array.prototype.reduce
This post is about javascript
reduce() has terrified me for some time! I hadn't wanted to touch this new array method because I couldn't quite follow what each of it's properties meant. But recently I had an opportunity to deep dive into this function. Here's how I refactored an object to get the results I needed
Written on -
Published Article: Building an Accordion Component with React Hooks
This post is about netmag articles published articles javascript
I wrote this post for Net Magazine issue 320. I wanted to showcase how I have begun using React Hooks, and hilight some best practices to follow for better accessibility.
Written on -
Published Article: Better Performance with the React Context API
This post is about performance netmag articles javascript published articles
Build for complexity and performance in this deep dive into React's Context API. This article was originally published in Net Magazine.
Written on -
Both Sides, Now
This post is about css javascript
Many people I respect and admire have voiced conflicting opinions on their blogs and Twitter recently. I wanted to reply in general with reference to a song that pops into my head every time I hear those conflicting opinions being discussed.
Written on -
A React performance case study
This post is about performance react javascript
Part of the way through a project to replace an app with a static site generated by Gatsbyjs, initial tests revealed that we there was a lot we could do to improve the performance. These are the steps we took to cut load times to under 3 seconds.
Written on -
Atomic Development
This post is about javascript gatsbyjs react
Structuring components in a reusable, discoverable way has been a challenge for some recent projects I've worked on. I've seen different approaches used, but now I think I've found a method that's basically intuitive, avoids duplication of effort and facilitates easy discovery of components.
Written on -
Serverless Content Authoring with StrapiJs
This post is about strapi javascript serverless
In order for people outside of the development team or community to use your software, care must be given to allow them to write and publish content with the least amount of friction or obstruction as possible. A well crafted interface that allows people to do this isn't easy. I have started to use Strapi as a serverless backend API interface recently and believe it's going to be a very useful solution for a lot of projects.
Written on -
Content-Author friendly APIs with Strapi
This post is about javascript tools apis
I've worked in a few different capacities around the web, and can see the value of interfaces that those writing content for the web feel comfortable using. I'm also becoming more comfortable with JavaScript, and want to find alternatives to the PHP tools I've been using. On that journey, I discovered Strapi.
Written on -
Deserializing Data in GatsbyJS
This post is about javascript gatsbyjs react wordpress headless
One of the great strengths in static site generator Gatsbyjs is the node API but it can present a few issues in certain circumstances when content is stored as escaped HTML, such as in WordPress posts and pages. Here's how we recently dealt with this issue when using react-helmet.
Written on -
Published article: From Wordpress to Developing in React — Starting to See It
This post is about javascript react jamstack
I recently decided to dive into learning React with a few courses and some experimentation. I had the aim of building a site in Gatsby.js as a test for building sites entirely in React. This is what I found out. This article was published on the gatsby.js blog.
Written on -
Published article: Notes from React London September 2017
This post is about javascript css indigotree
In September I attended React London meetup at Facebooks offices near Kings Cross to hear Benjie Gillam, Faraz Khan and Robbie McCorkell talk about GraphQL and css-in-js strategies.
Written on -
First Steps with Story Animations
This post is about animation javascript svg greensock scrollmagic
For a while now I've really enjoyed tinkering with animations as a way to bring a lot more quality to my projects. But as well as providing interactivity, I was curious to explore another way animations can be used in a project: to tell a story.
Written on -
Doughnut chart SVG Animation
This post is about animation javascript svg
For a recent project, I was asked to design an animation for a doughnut chart. The data could be dynamically editable by the content author, who could also choose how many animations to display on a given content area.
Written on -
SVG Animation on Hover with GreenSock
This post is about javascript svg animation
One thing I've tried to do more of is to use animations on frontend projects I've been involved with. GreenSock animation library is a great way of standardising and improving on animations that otherwise wouldn't be available on all browsers.
Written on -
Delaying click event in vanilla JavaScript
This post is about javascript
I was inspired by Rachel Nabors' site to add a short delay to users' clicking on a link on my website, so that I could add a brief animation that would run before the redirection took place. Here's how I did it
Written on -
Wordpress theming with Backbone.js
This post is about php wordpress javascript
You'll notice that there's not a huge amount of posts about JavaScript on my site. That's not an accident, I'm really only beginning to gain my feet with the language. Despite this I took the plunge and decided to build a Wordpress theme that uses Backbone.js to render the posts in a list. Here's a bit about the project.
Written on
See all tags.