*Feel free to move on to the next part if you already know what Context is.
So what is Context? Context is well, context about your app. Or simply, it is your app’s global state. Consider, that when you use useState (or this.state if you aren’t using hooks), you are more or less setting a local state that defines that component it is set in. But what if we needed that state in a component that is a deeply nested (or even just a few steps down)?
Before Context (or Redux), the approach was to prop drill. i.e. pass the…
But here’s the thing, you have to persevere.
I was honestly thinking just this. Patience, perseverance, or whatever you want to call it is truly a keynote of this whole article.
Another thing...just because you give up doesn't necessarily mean you don't have the perseverance. It could just mean you haven't found the medium that best works for your learning style or mentality. I tried doing Udemy and youtube tutorials but I found that without some sort of structure like you would find in an actual school didn't work for me. So I went to an actual bootcamp, and even though I slowed my pace, I've yet to give up and don't intend to,
Git is more than version control, it’s an epic backup system that allows you to safely store recent changes in a place where you can easily obtain if you experience a critical data loss. This of course is dependent on how frequently commit and push. If you lose data due to a failed hard drive or virus, or other such oopsie, you’d find that you’d have to start over if your last push was the day before.
I don’t know about you, but it would seriously suck if you made significant progress in a project and then have to redo…
Thank you. I am def going to try this out. In the meantime, I have some suggestions for improvement to DRY up your code, which I incorporated.
You only need normalize, the other 4 functions literally do the same thing.
Here's my Typescript version of your solution:
If you’re exploring functional programming, then it is worth learning how to loop, as looping is a key tool you’ll find your self using throughout your projects. There’s no way to really avoid it in this industry, that is unless you just write very small apps with no repetitive elements.
If you’re familiar with for, while, and forEach ways of looping, in functional programming, you should put that behind you as those are for (no pun intended) the OOP/Imperative paradigm. Definitely don’t forget them though. …
You ever look through someone else’s repo and not able to make heads or tails about what does what? Even if you’re a beginner looking at advanced code, you should be able to at least marginally tell what is what. If not, this isn’t necessarily a sign of a lack of skill or knowledge, but more so the failure of the developer to properly style their code and name their functions and variables descriptively enough (or at the least leave descriptive comments).
To that end, I’d like to lay out some pointers and a base style to give you an…
I thought this as well, along with worries of separation of concerns. After messing with styled-components though, I gotta say. One, performance isn't that bad. Two, it really makes CSS a little more powerful.
You can easily mathematically apply sizes, conditionally set different rules, and such. In regular CSS, you'd have to come up with a style rule per condition and conditionally set class name with DOM manipulation.
CSS-In-JS also solves the problem of specificity that the doing the above could cause. It's also fairly similar to Angular Directives.
There's also no real learning curve, for vanilla styling. If you know CSS, then you can use CSS-In-JS just fine. It took me under a day to figure out the basics.
The cons of CSS-in-JS is that i can cause some bloat but that's solvable by separating in separate files.
Ultimately, structure is determined by project requirements. If you’re contributing to an existing project, it’s important to keep the existing structure. But if you’re starting a project from scratch, you have some free room. It also depends if the project is truly your own, or if your company has guidelines for new projects.
If you’re new to the field and are still in the process of learning, however, then I hope this helps you as you develop your personal projects.
Firstly, structure is ultimately going to depend on the framework you choose.
There are a few ways you can setup…
Back in the day, if you wanted to login or register, you needed a password, plain and simple, no alternatives. It’s one of the most fundamental aspects of securing your personal data. But these days, people are opting for convenience than security. People are too lazy to maintain a password manager or write them down, so they try to retain hundreds of passwords in their head, instead of just having one password to rule them all (not as secure as having different passwords, but definitely more secure than passwordless). But even that has apparently become too much of a hassle…
For my last project during school, I was tasked with deploying it to the cloud, in particular, Azure. Now while Microsoft has OK documentation for using their services, they were terrible for adapting to the project I chose, which was an ExpressJS SSR application utilizing the Sequelize ORM.
So here I am writing a short tutorial on how to deploy an App like this one.
When you init a sequelize app, you’re given a few folders, config, models, and seeders. The first thing we are going to do is modify our config. By default, our config looks like this: