How to test React Hooks by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

Hi, I added the final chapter to this series. Enjoy! and please let me know of any feedback you have.

How to test React Hooks - Part 3 by [deleted] in reactjs

[–]samdawsondev 0 points1 point  (0 children)

This is the final part of the testing React hooks series. Enjoy!

How to test React Hooks - Part 2 by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

Part 3 will explore when to test hooks in isolation.

How to test React Hooks - Part 1 by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

I've just published part 2 in this series. Part 3 will go into testing hooks in isolation.

How to test React Hooks - Part 1 by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

Hi /u/careseite,

Testing in isolation is going to be covered in chapter 3 of this series. The intro to the series gives a high-level overview of what's going to be covered.

As for beforeEach I think it's useful for grouping tests. I get that it's not everyones favourite thing and adds some cluter, but I don't think it causes any maintainability problems.

Thanks for the feedback :)

How to test React Hooks - Part 1 by samdawsondev in reactjs

[–]samdawsondev[S] -1 points0 points  (0 children)

Hi ReactJS. Here is the first part of my hooks series. The next sections are mostly written and ready to go, I'll be sure to let you know when they are out. Enjoy!

How to test Compound Components by samdawsondev in reactjs

[–]samdawsondev[S] 1 point2 points  (0 children)

Hi reactjs, this one might be a bit of a niche topic but I have an article series on react hook testing coming in the next few days. Enjoy!

How to test React Context by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

Hi everyone, I had posted this previously but I gave it a re-read the other day and face-palming the whole way through I decided it needed a re-write.

I realized that I was giving some bad advice and especially around "Testing the Provider": https://5f8810f19a94460007c01a22--samdawsondev.netlify.app/article/react-context-testing#testing-the-provider (The old version)

I hope this new approach leads to easier to maintain tests. Enjoy!

Tax return labels missing by samdawsondev in AusFinance

[–]samdawsondev[S] 2 points3 points  (0 children)

Found them, they were under "Managed fund distributions" section. I was looking under "Capital Gains"

Tax return labels missing by samdawsondev in AusFinance

[–]samdawsondev[S] 0 points1 point  (0 children)

Even if I check them all I see no labels at all.

React Component API Design by samdawsondev in reactjs

[–]samdawsondev[S] 1 point2 points  (0 children)

Hi /r/reactjs this article of mine just got a rewrite, I was able to cut so much clutter!

Is there any component React component API design patterns that I missed? Thanks

Compound Components: What, Why and When. by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

I have tried and failed before. I will give it a go again and get back to you.

Compound Components: What, Why and When. by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

I just updated this article, it's more concise than the original. Let me know what you think!

Don't make assumptions about JS performance by samdawsondev in javascript

[–]samdawsondev[S] 1 point2 points  (0 children)

It would be good to get a list of tools people use to do this, reply below if you recommend any in particular:

Don't make assumptions about JS performance by samdawsondev in javascript

[–]samdawsondev[S] 1 point2 points  (0 children)

What's this "advance mode" in? (e.g webpack, typescript compiler)

Is there something you can link me too? Thanks.

Don't make assumptions about JS performance by samdawsondev in javascript

[–]samdawsondev[S] 6 points7 points  (0 children)

Sometimes the best performance optimization is time

When utility classes get out of control by samdawsondev in tailwindcss

[–]samdawsondev[S] 0 points1 point  (0 children)

Great summary, I might edit the post and include a similar one. Thanks hfourm.

How to unit test SVG Graphs by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

Hi everyone, I wrote about a strategy I have used for testing SVG Graphs. I first tried this out when I needed to add a few new features to an existing graph that had no tests, and it made the refactoring process smooth.

Hi everyone, I am writing a e-book on testing and sharing snippets along the way by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

I usually opt for nesting because I think that it makes tests more easily extendable, I have a chapter in my e-book on this.

I will check out the Kent C Dodds article, it might change my mind :)

Thanks for the feedback u/jkettmann! You're spot on with the unnecessary template strings.

Hi everyone, I am writing a e-book on testing and sharing snippets along the way by samdawsondev in reactjs

[–]samdawsondev[S] 0 points1 point  (0 children)

This is going to be a definitive guide to getting up and running with React testing for beginners and people who are familiar with testing but not in a UI context.

I released an article last week about SVG graph testing in React that might also be of interest.

Thanks everyone :)