Skip to content

Life cycle hook doesn't work when you have a template called before it. #11

@rosostolato

Description

@rosostolato

If you create a template before calling the component life cycle hook (onInit, onDestroy), it won't work:

function App() {
  const template = <MyComponent />;

  onDestroy(() => {});

  return (
    <div>{template}</div>
  );
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions