Choose an Open source license?

Should I apply a license for my hobby / educational projects on Github?
If yes, which one?
What can be the consequences of an unlicensed code?

A license is about granting rights to others, not limiting them.
So if you do not license your code you reserve all rights on it and grant none to others. What those rights are I can not say, it is highly dependent on your location / the location of the person using your code. In Germany, where I live, source code is usually not protected by copyright or patents, but your mileage may vary
For personal projects, I would use a very permissible license like BSD, MIT etc. You’ll most likely not be able/williing to enforce your rules, so having as few as possible seems like the best approach.
I don’t see any dire consequences of not licensing your projects, other than people will be reluctant to use and contribute to them. Of course, you’ll have to take care your licensing terms don’t collide with the licenses of third-party code you may use. For instance, proprietory licenses for paid software or the GPL.

1 Like

Let’s say I have a project in which I use React as a dependency. React has a 3-clause BSC license. Does this mean that I have to use the same license? Or can I simply put an MIT instead? Does my project mean a “redistribution” of React?

No you don’t have to use the same license. If you host your dependencies publicly (which is not necessary), just make sure to include their license file in your repository and you should be set.