Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaking change in behavior in interpolation (or bug?) 7.2.1 -> 8.1

See original GitHub issue

Hi, I came across this when upgrading to Preact 8 recently. I’m not sure of bug or new feature 😸 but I didn’t find anything about it in the migration docs.

Open console and execute these two gists.

First 8.1: It logs ["xx", "Hello"].

Then 7.2.1: It logs: ["xxHello"]

The only difference is the Preact version.

(adding the important parts of the code below if goes away)

const val = 'xx'
render(<Comp>{val}Hello</Comp>, document.getElementById('app'))

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

robertknightcommented, Mar 15, 2019

React renders a separate text node for each child:

import React from "react";
import { render } from "react-dom";

function App() {
  const two = "Two";
  return <div>One {two} Three</div>;

const root = document.querySelector("#app");
render(<App />, root);


Since Preact is consistent with React here and the current behaviour is easy to reason about, I think this issue can be closed. Please let me know if you can think of a strong reason to change this.

developitcommented, Apr 24, 2017

Yeah, I’m stuck on that. I guess really the only thought here is “what does react do?”, and AFAIK it just treats children as whatever you pass, so it’d be the Array of strings/numbers/etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

components/ at main · angular ... - GitHub
Breaking Changes. material. The following components have been re-implemented based on MDC: mat-autocomplete ...
Read more >
PHP 7 ChangeLog
Fixed bug #79971 (special character is breaking the path in xml function). ... Fixed bug #79068 (gdTransformAffineCopy() changes interpolation method).
Read more >
News — PROJ 9.1.1 documentation
Change order of horizontal and vertical operations when dealing with WKT1 / PROJ4 compound CRS (#3127). Coordinate Operations: Implement Vertical Offset and ...
Read more >
Release Notes :: NVIDIA Deep Learning cuDNN Documentation
The bug affected cuDNN 8.5 and 8.6 built with both CUDA 11.x and CUDA 10.2. ... Compared to cuDNN 8.1.0, there are known...
Read more >
Changelog - Cypress Documentation
Experimental Breaking Changes:​​ session() will no longer fail validation when false is returned from the validate callback. Fixes #21398, #24205, and #24593.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found