Webinar Preview: “Sharing Props Using Type Information” tutorial step for React+TS+TDD
As a reminder… next Wednesday (Oct 16) I’m giving a webinar on React+TypeScript+TDD in PyCharm. I’m doing some blog posts about material that will be covered.
See the first blog post for some background on this webinar and its topic.
Spotlight: Sharing Props Using Type Information
Now we get to some fun stuff: Sharing Props Using Type Information.
When you have lots of small components, they share information from parent "smart" components to child "dumb" (or presentation) components. This information is shared via properties, which forms the contract.
How do you write down that contract? This is where doing your React projects in TypeScript really shines. You can make an interface for your property information and say that your component’s properties conform to that interface. You gain IDE autocomplete, warnings, and more.
This really shines in TDD. You "fail faster" with visual squiggles that indicate you broke the contract, rather than waiting for the test to run.
This tutorial step shows a React functional component with property information in an interface, along with showing how to allow a default value for a prop. All done from a test-first workflow:
Subscribe to Blog updates
Thanks, we've got you!
Live stream: Who Is Behind Django? An Interview with the DSF President
We’ve all seen and used the famous Django framework, but there’s a lot more to a successful project than commits. The Django Software Foundation is a hallmark achievement in the Python community, but who’s behind it? In this interview, we’ll be talking with DSF President Chaim Kirby about its histor…
Join the Webinar: Efficient Information Extraction From Text With spaCy
Learn how to process and analyze unstructured data with spaCy, a trending open-source library for advanced NLP in Python. Join our webinar on May 11 at 4 pm UTC.
Webinar: “Reloadium: Faster Python Development with Hot Reloading in PyCharm”
You write your code, restart your server, and wait for the screen to update, but by then, you’re already interrupted. Ever wish you could use the fast development cycle frontends have with hot reloading? In this webinar we’ll meet Reloadium, a Python take on the powerful-but-challenging hot modul…
Webinar: “Speech-to-image generation using Jina”
If you’re involved in machine learning at all, you can’t have missed the plethora of groundbreaking models that have come out in past months. Two of the most hyped models are Whisper, OpenAI’s state-of-the-art speech recognition model, and Stable Diffusion, Stability AI’s groundbreaking image genera…