To be a hip-hop fan in 2018 is to be overwhelmed by change, particularly when it comes to its restless young talent. Just when you think you have a grasp on an artist like A-Boogie Wit Da Hoodie, a Queens native reshaping New York hip-hop, he suddenly pivots to a global-dance-pop style. Acclimate yourself to the barking antagonism of Tekashi 6ix9ine, a rainbow-haired instigator, and he suddenly embraces R. & B. Classify someone like Tyler, the Creator, as a relic of the petulant shock-rap era that his group, Odd Future, defined, and he unexpectedly matures into a clear-eyed and subtle stylist. Even the listening format is erratic: the genre now comes in epic twenty-five-song mixtapes, or in albums that barely break the twenty-minute mark. It is difficult to name another art form in recent history that has become so culturally dominant while being so thoroughly deconstructed, so fragmented and open to reinvention. It’s great fun, if you can get your bearings.

Some respite from this pace can be found on the West Coast, where tradition has a stronghold. In the wake of Kendrick Lamar, the lyrical sage and Compton native, who has become California’s biggest hip-hop artist since the nineteen-nineties, both Los Angeles and the Bay Area have produced a stream of invigorating young rap stars who keep their antennae tuned to the past as well as to the present.

If Lamar represents the superego of Los Angeles gangster rap, YG (short for Young Gangster)—a party-minded hustler, reporting from Compton’s front lines while navigating a tangle of foes—represents its modern-day id. Born Keenon Jackson, YG broke into the charts in 2010, with “Toot It and Boot It,” a melodic and snappy collaboration with another Californian, Ty Dolla $ign. The playful song found a raspy-voiced YG in the back of a club, acting more like a flirt than like a menace. He released a handful of mixtapes of varying quality. He often experimented with Auto-Tune and impersonated Lil Wayne, one of his favorite rappers. It wasn’t until his début album, “My Krazy Life,” from 2014, which was made with the Los Angeles producer DJ Mustard, that he found his vision: slick and narrative-driven, heavy on muted bass and minimalist minor-chord piano. It harked back to the era when West Coast hip-hop acts like N.W.A. and Snoop Dogg had a grip on the national consciousness.

The album was a breakout hit, but YG’s life descended into chaos the following year, in 2015. He and DJ Mustard had a falling-out. Donald Trump became a Presidential candidate and began spewing racist rhetoric, an insult that YG took seriously in the recording booth. And YG was shot in the leg by an intruder in his studio. Immediately after YG was released from the hospital, he recorded “Who Shot Me?,” the lucid and searching centerpiece of his sophomore album, “Still Brazy.” YG’s present-day concerns and paranoias revitalized the heavy legacy of West Coast hip-hop, and the album became a contemporary classic, if there can be such a thing. With the shooter at large, everyone posed a threat to the rapper. “They knew the code to my gate / That was awkward,” he rapped. “Answer this, I got a million dollars / Who shot me?” The track was a nod to the Notorious B.I.G.’s infamous dis of Tupac, “Who Shot Ya?,” but the sound is pure Los Angeles: a bass so slow and low that it is barely perceptible, ornamented with a synthetic Asian harp and a minimal piano melody that evoked a gangster “Pink Panther.” In the vivid tales of “Still Brazy,” neighborhood squabbles are stitched together with national indignities. Criminality is framed as a path to justice and righteousness. DJ Swish, the main producer on “Still Brazy,” perfected G-funk’s signature squelch and squeal. YG used the album form as a narrative framework, rather than as a dumping ground for singles and S.E.O.-minded collaborations and trend-hopping.

But stylistic reverence can yield to stagnation, a problem that YG, who is now twenty-eight, tackles on his third studio album, “Stay Dangerous,” which was released earlier this month. A national stage comes with greater demands from a marketplace that favors Southern trap styles and gimmicky teen-age stars. DJ Mustard, who has returned to handle most of the beats on the album, has in recent years made his sound more regionally neutral, and he has brought his findings to YG’s work. Some of these songs—like “Slay,” a soul-sampling female-empowerment anthem made in collaboration with Migos’s crowd-pleasing front man Quavo—sound more like Atlanta than like South Central. YG even tells one of his romantic interests, “I fly to Atlanta fast.” The record is spiked with his signature West Coast slang and speaker-rattling bass. But an urgent storytelling impulse has been replaced by a more casual, chorus-heavy sound, and YG’s chief concern is women. He’s also developed a chip on his shoulder about his trajectory. YG is a Los Angeles native who knows the risks of “going Hollywood,” a common expression of derision levelled at rappers from other cities who move to America’s entertainment capital and shed their street bona fides. “Bitch I’m from the streets, you on the outside looking in, tell me what you see? / You look . . . rich as fuck to me,” he says, on “Deeper Than Rap.”

The album’s major single, “Big Bank,” has become one of YG’s biggest hits. Its video opens with an unmistakably West Coast statement: young men shaking their dreadlocks in the hazy sun as the beat rattles the frame. YG raps from the roof of a moving car, framed by palm trees. But soon this gives way to a scene on a generic soundstage, which is necessary to accommodate the small army of collaborators invited to join this song: New York’s Nicki Minaj, Detroit’s Big Sean, and Atlanta’s 2 Chainz. It is hard to blame YG for taking this tack, given the number of young West Coast stars who have failed to break through to other cities.

The West Coast is not always a successful launching pad for hip-hop stardom, but it has a vital and dynamic scene nonetheless. One of this year’s brightest insurgents, Buddy, is a Compton native. Two of the genre’s most intriguing young stars, OMB Peezy and YBN Nahmir, were born in Alabama but have resisted the gravitational pull of Southern rap, citing West Coast rappers as their most formative influences. OMB Peezy now lives in Northern California and aligns himself with the hip-hop grandfather E-40, whose record label, Sik Wid It, has become a reliable incubator of talent.

Southern and Northern California have always had distinct styles, but they are increasingly in conversation with each other, as if in solidarity against the rapid churn of the online rap ecosystem. DJ Mustard’s trademark bounce is indebted to the Bay Area’s raucous hyphy movement—a wave of abrasive, early-aughts party rap recorded in defiance of mainstream trends. “Blame It on the Streets,” a short film and EP that YG made to accompany “My Krazy Life,” opened with a live track recorded in the Bay. One of YG’s closest collaborators and mentees is Kamaiyah, a twenty-six-year-old female rapper from the Bay Area. This year, Lamar oversaw the soundtrack to “Black Panther,” a film animated by the spirit of black Oakland radicalism. He used the platform to elevate the voices of young Bay Area stars like SOB X RBE, a quartet with a tendency to cram as many syllables as possible into a bar.

When Lamar accepted the Grammy for Rap Album of the Year, in February, he praised Mozzy, a Sacramento fixture who recently relocated to Los Angeles. Mozzy, a dazzling lyricist with an ear for sideways slang that rivals E-40’s, also appears on a new YG track called “Too Brazy.” It is the album’s most exhilarating and natural song—a gesture of accord between two gravel-throated Californians who are at their best when basking in the cold comforts of their common ground. “Two young niggas po-po chasing / Two young niggas on the block beefing / Freddie vs. Jason,” YG raps, hoarse and excitable. “We ain’t never fell off / Fuck you mean, we bringing Cali back?” Mozzy asks. It’s the sound of two stalwarts, holding their ground. ♦