# kotlinJs + react frameworks (ex. Next.js, Docusaurus, Gatsby)

**URL:** <https://discuss.kotlinlang.org/t/kotlinjs-react-frameworks-ex-next-js-docusaurus-gatsby/26511>\
**Category:** Support\
**Created:** [March 10, 2023, 4:39pm UTC](https://discuss.kotlinlang.org/t/kotlinjs-react-frameworks-ex-next-js-docusaurus-gatsby/26511 "2023-03-10T16:39:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nguyen-sde](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nguyen-sde](https://discuss.kotlinlang.org/u/nguyen-sde)\
**Post date:** [March 10, 2023, 4:39pm UTC](https://discuss.kotlinlang.org/t/kotlinjs-react-frameworks-ex-next-js-docusaurus-gatsby/26511/1 "2023-03-10T16:39:15Z")

</div>

Hi,

Is there a way to integrate a react frameworks with kotlinJs?  
For example, I am considering [Next.js](https://nextjs.org/), [Docusaurus](https://docusaurus.io) or [Gatsby](http://gatsbyjs.com) to generate react website in a gradle project with kotlinJs.

---

<div class="post-metadata">

**Author:** ![nguyen-sde](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@nguyen-sde](https://discuss.kotlinlang.org/u/nguyen-sde)\
**Post date:** [March 12, 2023, 10:31am UTC](https://discuss.kotlinlang.org/t/kotlinjs-react-frameworks-ex-next-js-docusaurus-gatsby/26511/2 "2023-03-12T10:31:56Z")

</div>

I see a common issue is that, react frameworks usually force to follow a strict project structure.

So, imo, the most generic way to integrate kotlinjs is to transpile kt files to js files without changing file structures. Then, the underlying framework will continue to process on the transpiled js files.

Technically, kotlinjs project should be just a normal js library. The only requirement of the library is that the output must keep the project structure, so the framework can continue to work on.

I think, we could implement a gradle plugin to connect the the kotlinjs output to serve as the input of the tasks to interact with the framework (ex. via framework CLI).

What do you think?
