# Type 'AnyRegularField' is not assignable to type 'LinkField'

**URL:** <https://community.prismic.io/t/type-anyregularfield-is-not-assignable-to-type-linkfield/14857>\
**Category:** Developing with Prismic\
**Tags:** nextjs, typescript\
**Created:** [December 29, 2023, 4:54pm UTC](https://community.prismic.io/t/type-anyregularfield-is-not-assignable-to-type-linkfield/14857 "2023-12-29T16:54:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![elegant-type](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@elegant-type](https://community.prismic.io/u/elegant-type)\
**Post date:** [December 30, 2023, 9:35am UTC](https://community.prismic.io/t/type-anyregularfield-is-not-assignable-to-type-linkfield/14857/2 "2023-12-30T09:35:27Z")

</div>

I ve found a solution, from the poste [here](https://community.prismic.io/t/ts2322-error-on-prismicrichtext-field-parameter/8901).  
Basing the accepted answer, we have two solutions, I used the second one, that is asserting the `type` of the `field` like this :

```auto
return (
            <NavigationMenu.Item>
            <MenuLink field={item.link as LinkField}> // Here comes the error i talked at beginning
               {item.label as KeyTextField} /* Here,nearly the same error, but saying "Type 'AnyRegularField' is not assignable to type 'KeyTextField'."*/
            </MenuLink>
          </NavigationMenu.Item>
        )

```

When I refresh the page, there's a error like this :  
`TypeError: (0 , react __WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function`

This is because the Radix UI component should be put into a client-side component. I added `use client` at the top of my `Navbar.tsx`, it works fine.

---

_[View the full topic](https://community.prismic.io/t/type-anyregularfield-is-not-assignable-to-type-linkfield/14857)._
