diff --git a/node_title_help_text.install b/node_title_help_text.install
index 71b397f..58a3315 100644
--- a/node_title_help_text.install
+++ b/node_title_help_text.install
@@ -5,13 +5,31 @@
  * Removes all variables set by module.
  */
 
+use Drupal\node\Entity\NodeType;
+
 /**
  * Implements hook_uninstall().
  */
 function node_title_help_text_uninstall() {
-  $content_types = node_type_get_names();
-  foreach ($content_types as $machine_name => $readable_name) {
-    $name = 'node_title_help_text_' . $machine_name . '_title_help';
+  $node_types = NodeType::loadMultiple();
+  foreach ($node_types as $type) {
+    $type->unsetThirdPartySetting('node_title_help_text', 'title_help');
+  }
+}
+
+/**
+ * Update title_help config to preserve previous database values.
+ */
+function node_title_help_text_update_8001() {
+  $node_types = NodeType::loadMultiple();
+  foreach ($node_types as $type) {
+    // Get value from state config
+    $name = 'node_title_help_text_' . $type->get('type') . '_title_help';
+    $title_help = \Drupal::state()->get($name) ?: NULL;
+    // Set title_help as ThirdPartySetting
+    $type->setThirdPartySetting('node_title_help_text', 'title_help', $title_help);
+    $type->save();
+    // Delete deprecated state config value
     \Drupal::state()->delete($name);
   }
 }
diff --git a/node_title_help_text.module b/node_title_help_text.module
index 36428ac..b25eb1b 100644
--- a/node_title_help_text.module
+++ b/node_title_help_text.module
@@ -7,6 +7,7 @@
 
 use Drupal\Core\Form\FormStateInterface;
 use Symfony\Component\HttpFoundation\Request;
+use Drupal\node\NodeTypeInterface;
 
 /**
  * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
@@ -15,12 +16,11 @@ use Symfony\Component\HttpFoundation\Request;
  *
  * @see menu_ui_form_node_form_submit()
  */
-
 function node_title_help_text_form_node_form_alter(&$form, FormStateInterface $form_state) {
-  $node_type = $form_state->getFormObject()->getEntity()->getType();
   // Retrieve and add description to node title field on node add/edit page.
-  $name = 'node_title_help_text_' . $node_type . '_title_help';
-  $description = \Drupal::state()->get($name) ?: NULL;
+  $node = $form_state->getFormObject()->getEntity();
+  $node_type = $node->type->entity;
+  $description = $node_type->getThirdPartySetting('node_title_help_text', 'title_help');
   if ($description) {
     $widget =& $form['title']['widget'];
     if (empty($widget[0]['value']['#description'])) {
@@ -37,47 +37,26 @@ function node_title_help_text_form_node_form_alter(&$form, FormStateInterface $f
  * @see NodeTypeForm::form()
  * @see node_title_help_text_node_type_form_submit()
  */
-function node_title_help_text_form_node_type_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
+function node_title_help_text_form_node_type_form_alter(&$form, FormStateInterface $form_state, $form_id) {
   // Set default value of the help text form element on node type form.
-  $name = 'node_title_help_text_' . $form['type']['#default_value'] . '_title_help';
-  $value = \Drupal::state()->get($name) ?: NULL;
+  $node_type = $form_state->getFormObject()->getEntity();
+  $value = $node_type->getThirdPartySetting('node_title_help_text', 'title_help');
 
-  $form['submission']['title_help'] = array(
+  $form['submission']['title_help'] = [
     '#title' => t('Title field helptext'),
     '#type' => 'textarea',
     '#default_value' => $value,
     '#description' => 'This text will be displayed at the bottom of title field when creating or editing content of this type.',
-  );
-
-  $form['node_type_help_text'] = array(
-    '#type' => 'hidden',
-    '#value' => $name,
-  );
+  ];
 
-  foreach (array_keys($form['actions']) as $action) {
-    if (isset($form['actions'][$action]) && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') {
-      $form['actions'][$action]['#submit'][] = 'node_title_help_text_node_type_form_submit';
-    }
-  }
+  $form['#entity_builders'][] = 'node_title_help_text_form_node_type_form_builder';
 }
 
 /**
- * Submit handler for content type that stores help text in variable.
+ * Entity builder for the node type form.
  *
  * @see node_title_help_text_form_node_type_form_alter()
  */
-function node_title_help_text_node_type_form_submit($form_id, &$form_state) {
-  // In case of change of machine name, remove the old variable.
-  $value = $form_state->getFormObject()->getEntity()->title_help;
-  $key = $form_state->getFormObject()->getEntity()->node_type_help_text;
-  \Drupal::state()->set($key, $value);
-}
-
-/**
- * Implements hook_node_type_delete().
- */
-function node_title_help_text_node_type_delete($info) {
-  // Delete the variable along with content type.
-  $name = 'node_title_help_text_' . $info->type . '_title_help';
-  \Drupal::config()->delete($name);
+function node_title_help_text_form_node_type_form_builder($entity_type, NodeTypeInterface $type, &$form, FormStateInterface $form_state) {
+  $type->setThirdPartySetting('node_title_help_text', 'title_help', $form_state->getValue('title_help'));
 }
