What did you learn from Ghostbusters? As long as you don’t cross the streams, you should be fine...
Just kidding. Decent cameras/NVRs support ONVIF, which is a protocol that allows different brands to work together, at least at high levels. If you have a Hikvision NVR, it should be able to use ONVIF to record from Dahua cameras (and vice-versa).
One area where brands seems to matter is Dahua IVS/Hikvision Smart Events. These are advanced motion detection features built into the cameras... using them (instead of regular motion detection) can really help reduce false alerts. Anyhow, getting these to work with NVRs is brand specific, meaning if you NVR is Hikvision and you have Dahua cameras, it can’t use the IVS feature on the Dahua cameras.
Personally, mixing and matching cameras is one reason why I really like Blue Iris. While BI supports both IVS on Dahua cameras and Smart Events on Hikvision cameras (using a feature called PullPoint subscription), it has its own built-in motion detection that has some options that the advanced stuff on the cameras don’t.
If using a NVR or OEM VMS ( like Dahua's SmartPSS or Hikvision's iVMS-4200 ) stick with the same OEM products for better compatibility ( as aristobrat points out the more advanced features called IVS/advanced features ) as both Dahua and HIkvision use different APIs.
That noted, there are products like Blue Iris which will work well with both ..
And there's always ONVIF and the various compatibility levels which allow at least a base level of functionality between products. You'll want to check what ONVIF profiles are supported by the NVR and cameras.