Kaine Bruce
Projects Blog About

All Blog Posts

Welcome to the site!

A nice new place to call home.

Posted on Monday, January 16, 2023 @ 03:11 PM UTC by Kaine Bruce

Tags:

  • Blog
I've spent a bit of time, redesigning and writing the code for this site. It's written using Astro JS I've tried to code it so that it's easy to maintain and not cobbled together, and Astro helps with that. I can write a blog post using markdown and focus on content. I can also add a JSX/TSX component straight into my Markdown, ...
» Continue Reading »

JavaScript: The Spread operator can be destructive.

While learning React, I was taught to use the spread operator to copy an array. This is not always a good idea.

Posted on Tuesday, April 12, 2022 @ 08:59 AM UTC by Kaine

Tags:

  • JavaScript
  • React
When updating the state in React I was taught to first copy the objects using the spread operator. However, this doesn't actually copy the objects, it just copies the reference of the object. ie, it's the same object! If you're unaware of it, this could catch you off guard.
» Continue Reading »

Recent Posts

  • Welcome to the site!
    Mon, Jan 16, 2023
  • JavaScript: The Spread operator can be destructive.
    Tue, Apr 12, 2022

Tags

  • Blog 1 Post
  • JavaScript 1 Post
  • React 1 Post
To the Top
  • Home
  • Projects
  • Blog
  • About

Kaine Bruce @ 2023