---
title: "Rupert McKay (@fildon) | Hashnode"
description: "Staff Software Engineer at Lokalise. Read the latest articles by Rupert McKay on Hashnode."
url: "https://hashnode.com/@fildon"
---

@fildon

# Rupert McKay

@fildon · Delft, The Netherlands · Joined May 2021

Staff Software Engineer at Lokalise

[Website](https://rupertmckay.com/)

## Comments

[The lookup time is still constant thanks to hash key lookup. The keys being ordered is a separate part of the same data structure.](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a/comment/621cd81a085330c3f79c5ddb#reply-621cdce1085330c3f79c5f60)

Reply · Article · Feb 28, 2022 · [What is Memoization?](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a)

[Strongly agree. Every project I've ever seen use CRA has eventually had to wrestle with its constraints and sooner or later they have to make the hard choice to eject or not. Either way, they seem to regret it :-D](https://hashnode.com/posts/opinion-you-dont-need-create-react-app/621c9d54085330c3f79c5367/comment/621ca084085330c3f79c53bb)

Comment · Article · Feb 28, 2022 · [Opinion: You don't need Create React App](https://hashnode.com/posts/opinion-you-dont-need-create-react-app/621c9d54085330c3f79c5367)

[In general, any time you see "foo is not a function" that suggests that you have an undefined reference. If you've followed along with the post above, the possible points of failure are either forgetting to jest.mock the relevant module path (e.g. jest.mock('my/path')) or forgetting to cast a mock type using the original type as the base (e.g. const mockFoo = foo as jest.MockedFunction<typeof foo>).](https://hashnode.com/posts/mocking-in-jest-with-typescript-and-react/60e06c0903707d644a50080d/comment/61ed5d8aa12088017fbec05a#reply-61ee5cebc99aed184e726586)

Reply · Article · Jan 24, 2022 · [Mocking in Jest with TypeScript and React](https://hashnode.com/posts/mocking-in-jest-with-typescript-and-react/60e06c0903707d644a50080d)

[Thank you, Marcelo! It's comments like these that make me excited to keep writing articles in the future.](https://hashnode.com/posts/sorting-in-javascript/61e525c98a425719c1735ae4/comment/61e7f1336f4d6f431978d071#reply-61e7f2f50204273bdcb10e1e)

Reply · Article · Jan 19, 2022 · [Sorting in JavaScript](https://hashnode.com/posts/sorting-in-javascript/61e525c98a425719c1735ae4)

[That's a great point! I'll update the article to make that clear. EDIT: I have made an update now and called out the in-place sorting in a few parts of the post. Thanks again for pointing this out!](https://hashnode.com/posts/sorting-in-javascript/61e525c98a425719c1735ae4/comment/61e6d1bf0204273bdcb0f3c6#reply-61e6da050204273bdcb0f471)

Reply · Article · Jan 18, 2022 · [Sorting in JavaScript](https://hashnode.com/posts/sorting-in-javascript/61e525c98a425719c1735ae4)

[Honestly, I've not had much experience with workspaces. My usual inclination would be to coordinate via npm packages. But I know that's not everyone's preference. I'd be really interested to read a write-up on how exactly the build process I've described above would need to change in a multi-workspace monorepo.](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f/comment/60f3173266fcdb0a02742804#reply-616d2dd0f1f4c944cc6b30e9)

Reply · Article · Oct 18, 2021 · [Publishing TypeScript React components to NPM](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f)

[Steve Barakat Yup, that's exactly it! I want the code I write to be as easy to use as possible for people that depend on it. Maybe the difference between from 'Button/Button' and from 'Button' isn't much, but it is something I can do to help even if only a little. The tradeoff is it means I need to have a top-level index file that re-exports everything from a single entry point.](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f/comment/6147dd45699fe76cd34836bd#reply-616d2c7c441bd36daa957e07)

Reply · Article · Oct 18, 2021 · [Publishing TypeScript React components to NPM](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f)

[Hey good question! I recommend having a single higher level index.ts that gathers together everything you want to export from your library. Guessing from the folder structure you have pictured, you could have an index.ts at: src/index.ts Which contains: export { DualRangeSlider } from './components/DualRangeSlider' export { DualVerticalRangeSlider } from './components/DualVerticalRangeSlider' // etc Then your build process just needs to point at that single index file to bundle up everything you want your library to expose. I'm doing this in the example provided in the article, but it's probably not obvious because I only have a single example component to re-export. But that same pattern works for any number of components, as long as they each have an entry in the top-level index file. I'll make an edit to the article to make this clearer when I have some time on the weekend 🙂](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f/comment/6147dd45699fe76cd34836bd#reply-614b9c8d544e242e0c93db77)

Reply · Article · Sep 22, 2021 · [Publishing TypeScript React components to NPM](https://hashnode.com/posts/publishing-typescript-react-components-to-npm/60f30734bb67011cb8369b7f)
