On the afternoon of 24 June 2016, the day on which it was announced that the UK had voted to leave the European Union, a tweet caught my eye. “Looking forward,” it read, “to the slew of novels in 2018 that take place against the backdrop of the tumultuous referendum of 2016.” Forty-five minutes later, although I had no particular reason to think the tweet was directed at me, I replied: “Who showed you the contents of my hard drive?” I wonder why I already sounded so defensive, even from behind a veil of irony. At that point, after all, I was not planning to write a novel that touched in any way on the issues raised by the referendum. I was planning a slender historical novel set in the 1970s and located mainly in Germany. My creative thoughts were a long way from the Britain of 2016. I had no intention of engaging with the present moment or even the recent past.

What I ended up writing, instead, was a novel called Middle England which is studded with specific references to recent events in the UK, both political and non-political; events that pivot around the Brexit vote, even though the referendum campaign itself only occupies a couple of chapters. And although I had the sense, especially while writing the second half, of racing to keep up with the fast-moving news cycle, I am by no means the quickest writer off the block in producing a fictional response to Brexit. We may not quite have seen the “slew” of novels predicted, but there have certainly been a number of significant ones, enough to have generated their own literary category – “Brexlit” – with an academic book on the subject already promised.

The Cut by Anthony Cartwright, published in June 2017, was a novel specially commissioned by its publisher to engage with the social and cultural divisions exposed by the vote. Here, the national schism over Brexit is crystallised in the fraught relationship between a metropolitan documentary-maker and the Black Country manual worker she chooses as her subject. Amanda Craig’s The Lie of the Land, which was published only one week after Cartwright’s novel, was mainly written ahead of the 2016 referendum but presciently depicts the tensions and resentments between the rural poor and incomers from the cities. This year saw the publication of Sam Byers’s Perfidious Albion, a mordant, needle-sharp satire set in a post-Brexit near-future, charting the rise of a Farage-ish political figure swept on his way by gusts of online controversy and outrage.

At the forefront of the British novelists’ rapid response unit, however, was Ali Smith, whose novel Autumn was published at the end of August 2016 yet still managed to include passages that referred directly to the referendum, albeit in general terms: “All across the country, people felt legitimised. All across the country, people felt bereaved and shocked. All across the country, people felt righteous. All across the country, people felt sick. All across the country, people felt history at their shoulder. All across the country, people felt history meant nothing. All across the country, people felt like they counted for nothing. All across the country, people had pinned their hopes on it. All across the country, people waved flags in the rain. All across the country, people drew swastika graffiti. All across the country, people threatened other people. All across the country, people told people to leave. All across the country, the media was insane.”

‘All across the country, people waved flags’ … the People’s Vote march in London, October 2018. Photograph: Xinhua/Barcroft Images

One year later, Smith continued her fusion of public and private narratives with the second volume of her seasonal quartet, Winter, a novel also thoroughly informed by recent events. So much so that it prompted reviewer Stephanie Merritt to flag up the danger that the determination of these novels to be absolutely of-the-moment might be the very thing that dates them. “These novels are a deliberate publishing experiment, to see how close to publication the author can capture current events; inevitably, even at a distance of months, 11th-hour references to the Grenfell fire and Trump’s reclaiming of ‘Merry Christmas’ already seem like snapshots of the past.”

The assumption is that a good novel should outlive its time and speak to future generations of readers

The idea of that challenge – “to see how close to publication the author can capture current events” – certainly resonates with me now that Middle England is finished. The final chapter, set in September 2018, was actually written in April this year, and in the intervening months I have been in the perverse and paradoxical position of hoping, as a remain-voting citizen, that something dramatic would happen to throw a spanner into the works of Brexit, while also hoping, as a writer, that nothing of the sort would happen as it would derail the closing narrative trajectory of my book.

It’s an interesting by-product of the referendum, at any rate, that so many novelists seem to feel an urgent need to address the present moment. Brexit has focused our minds. The potential downside is that, in the rush to engage with the contemporary, we lose perspective. A novel is supposed to take the long view. It is supposed to speak to the future, and to readers who may not be familiar with the culture from which it arises. In writing Middle England, I wanted to convey a strong and specific sense of the texture of English public life in the last eight years, but after finishing it I began to wonder whether this could only restrict its audience. Had it been a good idea to fill it with references to Michael Gove, Jeremy Corbyn, Victoria Wood and Vince Cable, and to the ins and outs of 2015’s general election result? Wouldn’t a lot of that stuff be baffling to readers in 10 years’ time, or to people reading it in Greece or Poland?

A great exemplar for this trend in contemporarily-focused novels is a book published in 2008. Gordon Burn’s Born Yesterday: the News As a Novel engaged in minute and specific detail with the stories dominating the news cycle in the summer of the previous year. “There is a national life, and intimate life,” Burn wrote in his closing pages. “The distance between these two grids is very great.” He seems to have written Born Yesterday as an attempt to build a bridge between these two grids, taking as his cue Ezra Pound’s aphorism: “Literature is news that stays news.”

In an interview at the time, Burn explained: “I’d had this idea about taking the Capote/Mailer non-fiction novel thing to its ultimate, which would also involve how things have changed with rolling news. The idea was to find a story, and the moment the news explosion happened to go there and write about it, turn it into a novel in the way that happens all the time through rolling news, newspapers, blogging. And to turn it around fast, so that the novel came out while the news coverage was still fresh in people’s minds.” Events thwarted him, to some extent, in that there was no single, defining story that dominated the news media in the summer of 2007. It was a summer, instead, that threw up a random assemblage of loosely connecting stories: Tony Blair stepping down as prime minister and handing over to Gordon Brown; a racism row on Big Brother; car bombs in London and Glasgow, floods in the Midlands and an outbreak of foot-and-mouth; the abduction of Madeleine McCann.

Immersing itself wholeheartedly in this slipstream, Burn’s novel was sometimes criticised for its unselective appetite for the quotidian, the passing event of no real significance. Writing in the London Review of Books, Theo Tait noted that in some ways Born Yesterday “seems merely to have surrendered to the news and its detritus. In a few years’ time, who will know who Esther McVey is, or care that Brown was sent to Nicky Clarke for a haircut as part of his prime ministerial makeover?” (It does not invalidate Tait’s point to observe that, 11 years after the book was published, Esther McVey is still in the news: that’s another story altogether.)

At the forefront of the British novelists’ rapid response unit … Ali Smith. Photograph: Antonio Olmos/The Observer

The assumption behind these caveats is that a good novel should outlive its time, should speak to future readers if not future generations of readers, and that cluttering it up with ephemeral detail, the “detritus” of everyday news, will work against this ambition. Today, most of us rely on footnotes or contextualising introductions to get us through Barnaby Rudge or Les Misérables: it comes with the territory of reading old books. But there is a reason why Gulliver’s Travels, say, is more popular than the same author’s A Tale of a Tub. The latter is a densely moulded satire on contemporary English habits in religion, politics and scholarship, whose effects depend on a precise understanding of its context, while book four of Gulliver requires little in the way of glossary: the basic dichotomy between Yahoos and Houyhnhnms is about as timeless as a piece of writing can get.

Burn would perhaps counter – if he were still with us – that Born Yesterday is not really a novel about the big stories of 2007 but a more personal project that explains how it feels to be on the receiving end of a relentless tide of incoming news, and how you orientate yourself within it. To this end, a figure pops up throughout the novel, first as an anonymous dog walker in Battersea Park and then as an unnamed writer who is finally revealed to be none other than Gordon Burn. This device foregrounds the experience of being at the centre of a news maelstrom, but also places a somewhat awkward distance between the reader of the novel and Burn himself: since part of Burn’s reason for following the news so obsessively is that he is writing a book about it, the reader’s own relationship to these public events turns out to be different – and rather more straightforward.

By contrast, despite the way it also plays with shifting authorial identities, Olivia Laing’s recent novel Crudo supplies a looser and more immersive sense of being caught in the current of fast-moving news (in this case dating from a different summer, the summer of 2017). It slides fluidly between first- and third-person, subjective and objective: “She was finding it hard to sleep, she had perpetual headaches, she knew she shouldn’t read the paper, but she snuck looks from the minute she woke up. What’s Putin doing, what’s happening in China, in North Korea, in the US? How’s the car-crash of Brexit proceeding, how are they getting along with changing all the country’s laws in secret, how much do we hate foreigners today, who’s winning?” True to form, Laing’s novel provoked a now familiar objection from reviewers, with Claire Lowdon in the Sunday Times pointing out that in many areas “the subject matter is already past its use-by date … In five years’ time, we’ll be struggling to remember Ed Miliband, let alone the Edstone.”

Burn’s and Laing’s books both exist at the intersection of the documentary (or non-fiction) novel and autofiction. Middle England’s relationship to the public present and recent past is different. Autofiction is a literary form I sometimes enjoy as a reader but have no inclination (or ability) to write myself. In my far more traditional novel, the specificity of the historical detail, the precise dating of the chapters, is intended to create a solid scaffolding against which the wholly fictional narrative of the characters’ private lives can rest securely. This scaffolding looms large and prominent, and I’m aware that, as a result, the German edition may well have to come burdened with footnotes, and that even most British readers will soon have forgotten, for instance, that there was an Australian called Trenton Oldfield who tried to disrupt the Boat Race in April 2012 by swimming ahead of the teams. But it is random happenings and talking points like this that make up the background noise of our lives, and if you want to convey a sense of that, you have to include them. With Burn’s example in mind, I was happy to embrace the detritus.

‘Will references to Jeremy Corbyn and the election result be baffling to readers in 10 years’ time?’ Photograph: Neil Hall/EPA

There is another risk involved in tying your story to very recent history, of course: getting it wrong. Unlike novels, history does not tend to have neat beginnings and endings. When does the story of Britain’s prickly, love-hate relationship with continental Europe begin? Maastricht? The 1975 referendum? The Treaty of Rome? 1066? And who can say when it’s going to end? Definitely not on 29 March 2019. I had to give my novel a sense of closure, but in reality the story it tells is not over yet, and future readers may decide that my ending strikes a false note. I had to reconcile myself to this. I had to tell myself that reaching a historically correct conclusion when we are still in the midst of a messy, unfolding narrative was an impossibility. And if your book is lucky enough still to have any readers 10, 20 or 30 years after you wrote it, one of the things that may interest them most is the sense that your perspective was skewed, or simply that you made mistakes. Meanings change, and if a novel is to be any kind of living, breathing thing – rather than a thesis or an extended piece of journalism – those changes in meaning may be precisely what helps keep it alive.

Rereading Born Yesterday 10 years after it was published, it was fascinating to see that Burn – even though he writes so knowledgeably and with such clear-eyed scepticism about the role played by financial markets in political and public life – does not see the crash of 2008 coming. How could he? Who did? Rather than render the book meaningless, this absence, aided by our own gift of hindsight, gives it an extra, unexpected poignancy.

In one of his shorter prose pieces, BS Johnson – the true pioneer of British autofiction, incidentally, with his superb 1966 novel, Trawl – once wrote a simple, discrete sentence, that has always haunted me: “Someone has to keep the records … ” When (not if) people come to look back on the last few bitterly seismic years in our national life, novels – whether or not they address, engage with or even mention the referendum – will be one of the most vital resources in trying to understand what happened. There are quite a few of us, it seems, trying to keep the records, in various styles and genres, with varying degrees of success. And sometimes the best way of doing it is to shake off those seductive fantasies about posterity and immerse yourself instead in the ephemeral and the ultra-contemporary. If that occasionally means making wrong choices, striking false notes, placing the wrong emphasis, so be it. Reality can never quite be nailed down in fiction. As Johnson said at the end of another of his novels, looking back on the process of writing it: “In the course of the book I’ve come to see differently events I believed to be fixed … Who knows what else will have shifted by galleyproof stage, or pageproof stage, or by publication day, or by the time you are reading this? … All I can say is that’s how it was then, that’s the truth.”

• Middle England by Jonathan Coe is published by Viking. To order a copy for £14.95 (RRP £16.99) go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99.