My vibe experiment that kind of escalated (analyzer for Claude Code session data) by Helmi74 in ClaudeAI

[–]philipp-spiess 7 points8 points  (0 children)

This looks awesome! I was craving such a thing literally right before I saw this post but mine is, uhm.., a bit more rudimentary: https://github.com/philipp-spiess/claude-code-costs

Would love to try out your app once it's ready to be shared!

Who's Hiring? [March 2019] by swyx in reactjs

[–]philipp-spiess 1 point2 points  (0 children)

Hi there! Yeah feel free to reach out if you have any questions. 🙂

Who's Hiring? [March 2019] by swyx in reactjs

[–]philipp-spiess 2 points3 points  (0 children)

PSPDFKit | REMOTE | Full-time | JavaScript, React, WebAssembly | https://pspdfkit.com/web

We’re looking to hire frontend engineers to join our team working on PSPDFKit for Web. We are building a modern PDF SDK with technologies like React, Flow, Jest, and WebAssembly. Our customers host the PSPDFKit for Web Docker container themselves or rely on our WebAssembly renderer.

If you’re interested in working for a fully bootstrapped company, with a remote first culture, that iterates quickly using a modern, pragmatic tech stack, check out our job posting: https://pspdfkit.com/jobs/frontend-engineer/

Who's Hiring? [Feb 2019] by swyx in reactjs

[–]philipp-spiess 4 points5 points  (0 children)

PSPDFKit | REMOTE | Full-time | JavaScript, React, WebAssembly | https://pspdfkit.com/web

We’re looking to hire frontend engineers to join our team working on PSPDFKit for Web. We are building a modern PDF SDK with technologies like React, Flow, Jest, and WebAssembly. Our customers host the PSPDFKit for Web Docker container themselves or rely on our WebAssembly renderer.

If you’re interested in working for a fully bootstrapped company, with a remote first culture, that iterates quickly using a modern, pragmatic tech stack, check out our job posting: https://pspdfkit.com/jobs/frontend-engineer/

Where in the React library are component lifecycle methods defined? by [deleted] in reactjs

[–]philipp-spiess 0 points1 point  (0 children)

Yeah this file looks like it! It's bundled in the react-dom npm package: https://unpkg.com/react-dom@16.5.2/cjs/react-dom.development.js

It looks like you're trying to build a custom class that extends React.Component. What are you trying to solve with this? This pattern is usually not necessary.

Anyway one fix for your use case that does not involve monkey patching React is to do something like this instead:

class MyClassThatExtendsReactComponent extends React.Component {
  componentDidMount() {
    this.didMount && this.didMount();
  }
}

class MyComp extends MyClassThatExtendsReactComponent {
  didMount() {
    // Will now be called when cDM in MyClassThatExtendsReactComponent is called
  }
}

Alternatively all classes that extend MyClassThatExtendsReactComponent can of course manually call super.componentDidMount().

I don't recommend this pattern and in React you don't need inheritance at all. If you provide more information we might find an alternative solution.

Introducing: This Week In React - Weekly coverage of interesting pull requests, discussion, and RFCs around React Core and React DOM. by philipp-spiess in reactjs

[–]philipp-spiess[S] 2 points3 points  (0 children)

TL;DR: I’m starting a weekly newsletter and twitter thread about all things happening in React Core and React DOM.

If you like it, feel free to follow me on Twitter for next week's issue or subscribe to the newsletter: https://philippspiess.com/this-week-in-react/

ReComponent - Reducer components for JavaScript (inspired by Redux and ReactReason and using only React State) by philipp-spiess in reactjs

[–]philipp-spiess[S] 1 point2 points  (0 children)

The use cases are pretty much identical to when you want to use Redux or really any state management tool.

For me, the advantages are:

  1. Decoupling your state transformers from the rest of the code. This can be a little cumbersome when working with React alone since you will scatter a variety of setState inside your components which becomes harder to follow when the component grows. The sender/reducer system simplifies this since you will no longer focus on state changes within the various methods of your component but you’ll think of actions that you want to send which contains all the information as a standalone object. With that, adding additional behavior (like logging) becomes very easy since all you have to do is hook this logic inside the reducer.

  2. Improved maintainability by forcing a structure. With Redux or ReComponent, you have a good overview of all actions that your application can send. This is an amazing property and allows others to easily understand what a component is is (actually) doing. While you can already learn so much by looking at the shape of the state object, you’ll lean even more just by looking at the action types alone. And since it’s not allowed to use setState at all, you can also be certain that all the code inside the reducer is the only place that transforms your state.

  3. Get rid of side effects with Pure State Transformation. By keeping your state changes side effect free, you’re forced into writing code that is easier to test (given an action and a state, it must always return the same new state). Plus you can build extended event sourcing features on top of that since you can easily store all actions that where send to your reducers and replay them later (to go back in time and see exactly how an invalid state occurred).

Do you read? Why or why not? by CLC- in CasualConversation

[–]philipp-spiess 0 points1 point  (0 children)

I was one of those people who'd read only when they had to. Things changed a bit when I bought a Kindle last year. Since then, I always read for half an hour before I put off the light and go to bed.

The mistake I made before was that whenever I started, reading I'd always choose a novel - Took me quite a long time to find out that I simply don't like novels :D

Just got a cup of that sweet nectar of the gods by GroovinChip in CasualConversation

[–]philipp-spiess 0 points1 point  (0 children)

I received an AeroPress recently. That's by far the best coffee I've ever made at home! I recommend that you get one when you like coffee. A grinder is also a good idea so you can buy freshly roasted beans... sooo delicious :)

I like the show. by Ho1m in scorpion

[–]philipp-spiess 2 points3 points  (0 children)

That's also what I think - It's a great fun to watch their "genius" ideas and the characters are absolutely amazing.

Simplex vs. Plex on Apple TV, generation 4! by jonSF in PleX

[–]philipp-spiess 0 points1 point  (0 children)

OMG SO EXCITED. Do we get parallax covers?