Check out example codes for "ruby on rails". It will help you in understanding the concepts better.

Code Example 1

ActionMailer::Base.smtp_settings = {
  :user_name => 'your_sendgrid_username',
  :password => 'your_sendgrid_password',
  :domain => 'yourdomain.com',
  :address => 'smtp.sendgrid.net',
  :port => 465,
  :authentication => :plain,
  :enable_starttls_auto => true
}

Code Example 2

public OfficeManager() {//constructor
		employees = new Employee[10];
	}

Learn ReactJs, React Native from akashmittal.com