It's very self explanatory, but project-based learning is a learning technique that focuses heavily on building real-world projects. The alternative is following tutorials, but that is ineffective and many times, you'll forget what you learn from a course or tutorial series because you're typically consuming a lot of information without applying it. Thus, you don't truly understand a concept and waste a lot of your precious time trying to follow tutorials.
Now, don't get me wrong. Courses are amazing, and I love how they give you a structured curriculum, but if you're learning React, for example, you don't need to learn every nuance of the technology and explore the advanced concepts before you get the opportunity to hammer down the basics. Even if the course provides practice problems, those exercises are likely not meaningful to you, meaning that you won't retain the content for very long.
On the other hand, project-based learning, if done correctly, lets you get a feel of the basics through simple tutorials (preferably by reading the docs or watching youtube) and then immediately building what you want once you gain enough understanding to start writing your own code. Most people learning how to code have a project in mind that they can't wait to start, but unnecessary material interferes and many fall into the trap of wanting to learn it all, so they never end up completing their goal. However, project-based learning gives them the chance to start working on their project right away. Furthermore, Project-based learning gives you the freedom to learn as you create, so you'll definitely master the art of scouring StackOverflow for answers to problems. And unlike with courses, you will use 100% of the stuff you learn because it will directly apply to a problem that you are trying to fix.
First of all, project-based learning is extremely fun. You don't need to listen to a teacher for hours a day like at school because you get to learn by doing and even failing. Learning from your mistakes is very effective, as you probably know, so why not incorporate it into your learning process more?
Project-based learning is also powerful for building your portfolio and padding your resume. Portfolio websites are really popular nowadays, so this is a great way to fill up the "projects" section. But even if your goal isn't to switch careers, it's very impressive to have 10+ projects which you can claim as your own and show to your friends and family. And remember, employers want to see proof rather than words.
And if you need more stuff to boost your portfolio, you can try learning some algorithms and implement them into previous projects or even make an algorithm visualizer that explicitly shows how comfortable you are with concepts that companies actually care about.
The main disadvantage project-based learning is the difficulty that comes with finding a meaningful project. A simple google search will result in todo lists and Pomodoro timers, but I personally don't think that those are effective in inspiring motivation. Todo lists have been made a million times (literally) and don't provide enough of a challenge to really get your brain working. These projects are also very small and less impressive for a portfolio. Thus, you need to do some extra digging or sit down and ponder possible projects that would be useful for yourself or useful for the world. Some examples of projects I've made to solve some personal problems include a platform that lets you create stylish code snippets for online sharing (similar to carbon.sh) and an automatic SVG generator that produces polygons, waves, and particles in a specified size and color.
This is my first article, so please leave feedback about everything to help me become a better writer and developer for future articles!