src/helpers/hoist.js
function generateHoistNameBasedOn(path, suffix = "") {
  const names = [];
  if (suffix) {
    names.push(suffix);
  }

  let current = path;
  while (!(current.isIdentifier() || current.isJSXIdentifier())) {
    names.push(current.node.property.name);
    current = current.get("object");
  }
  names.push(current.node.name);

  return path.scope.generateUidIdentifier(names.reverse().join("$"));
}
function generateHoistNameBasedOn(path, suffix = "") {
  const names = [];
  if (suffix) {
    names.push(suffix);
  }

  let current = path;
  while (!(current.isIdentifier() || current.isJSXIdentifier())) {
    names.push(current.node.property.name);
    current = current.get("object");
  }
  names.push(current.node.name);

  return path.scope.generateUidIdentifier(names.reverse().join("$"));
}
function generateHoistNameBasedOn ( path , suffix = "" ) { const names = [ ] ; if ( suffix ) { names . push ( suffix ) ; } let current = path ; while ( ! ( current . isIdentifier ( ) || current . isJSXIdentifier ( ) ) ) { names . push ( current . node . property . name ) ; current = current . get ( "object" ) ; } names . push ( current . node . name ) ; return path . scope . generateUidIdentifier ( names . reverse ( ) . join ( "$" ) ) ; }
Name Smartly Do Good.
Name Smartly Do Good .