Skip to content

Commit

Permalink
added some more reviewed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmin2 committed Sep 18, 2024
1 parent 1035a3d commit 347fc17
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/generator/docs/nunjucks-depreciate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 170

### Introduction

The asyncAPI generator is moving away from Nunjucks templates in favor of React templates. This guide will help you migrate your existing Nunjucks templates to React.
The asyncAPI generator is moving away from Nunjucks templates in favor of React templates. This guide will help you migrate your existing Nunjucks templates to React. For a comprehensive understanding of why we introduced React as an alternative in 2021 and why we're now removing Nunjucks entirely, please read our article [React as a Generator Engine](https://www.asyncapi.com/blog/react-as-generator-engine). The principles discussed in this article still apply to our current transition.

### Step-by-step migration guide

Expand Down Expand Up @@ -115,6 +115,17 @@ export default function({ asyncapi }) {

//TODO: we can add a link to Florence docs once it is merged

### Additional Resources and Information

#### Template Examples
For a complete example of React features in use, please refer to the [AsyncAPI Template for Generator Templates](https://github.com/asyncapi/template-for-generator-templates). The `master` branch demonstrates all React features, while the `nunjucks` branch shows the old Nunjucks implementation. This comparison can be particularly helpful in understanding the differences and migration process.

#### Filters to Helpers
If you've been using Nunjucks filters placed in the `filters` directory, you can still use this functionality in React. However, they should be treated as normal functions that you import into your components. We recommend renaming the `filters` directory to `helpers` to better reflect their new usage in React.

#### Hooks Remain Unchanged
It's important to note that hooks remain unchanged in this migration process. Hooks are not related to the render engine functionality, so you can continue to use them as you have been.

### Testing your migration

After migrating, test your template thoroughly:
Expand Down

0 comments on commit 347fc17

Please sign in to comment.