What is the right way to blend C++ and Blueprint?

So I recently switch to using unreal engine from unity. I have had some experience with C++, but none with Blueprint. Obviously, I wanted to do everything in C++ but I have read online that it is probably better to use both. Right now I am confused on how to blend these 2. I have thought of two ways:

  1. Use Blueprint to declare classes, and then use C++ to write components that handle logic (similar to MonoBehavior in Unity) that will be later added to blueprint classes.

  2. The class, with all its components and variables are written in C++, and then Blueprint will inherit from that class. Blueprint can be used to change instance variables’ values quickly.

Are either of those ways good? Are there better ways to do it?

There really no “right way”, it depends want you do, how things are setup in UE4 for perticilar thing and what you and your team feel comfy with.

Most common way is 2, that how engine does in general it also allows to do overrides from default programmed behaviors, but doing components is good to, aspecially if you want to make code that will work with any actor.

Have a look at this page Balancing Blueprint and C++