Skip to content

[Bug?]: Cannot access context when read in Meta content prop. #41

@thetarnav

Description

@thetarnav

If you try to read context inside content prop of Meta component provided by start, the context will not be available, which is not expected as it's used directly under the provider.

<Ctx.Provider value={{ text: 'you should see this' }}>
  <Html lang="en">
    <Head>
      <Meta
        name="description"
        content={useContext(Ctx).text} // ctx read here is not available
      />
    </Head>
    <Body>...</Body>
  </Html>
</Ctx.Provider>

https://stackblitz.com/edit/solid-start-meta-context-issue?file=src%2Froot.tsx

I'm interested in working on a fix if this is something that's considered a bug.

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