Skip to content

Translate returning invalid value #66

@tariellaelius

Description

@tariellaelius

After updating to the latest version and switching to <Translate> from localize(), the following error logs to the console and the app doesn't render at all:
Invariant Violation: Translate.render(): A valid React element (or null) must be returned.
It happens when using <Translate> with the id property, but if I supply it a render prop function, everything works well. The code is pretty simple:

const Introduction = () => {
  return (
    <section className={style.Introduction}>
      <article className={style.About}>
        <Translate id="introduction" />
      </article>
    </section>
  );
};

export default Introduction;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions