generator-react-sdk
generator-react-sdk copied to clipboard
feat: update dependencies
Description
- Update dependencies
Related issue(s)
Fixes #208
@jonaslagoni I tested it at work with react@18 and it worked, for some reason it got installed instead of react@17 and it was breaking our build. I used patch-package to add the export to the [email protected] file and it worked just fine.
Sadly, I have tried to set it up locally with @asyncapi/cli and @asyncapi/html-template and I'm not able to get it to work 😞
WIll try to find out if the upgrade is possible when I have the time 👌
I would probably try with just Generator and HTML-template (skipping CLI for simplicity) and using NPM link 🤔
Definitely need that test to go through 😄
@jonaslagoni I was able to test it as you mentioned. It failed 😅
This change is needed in the template to get it to work
export function renderSpec(asyncapi, params) {
loadLanguagesConfig();
const config = prepareConfiguration(params);
const stringified = stringifySpec(asyncapi);
const component = <AsyncApiComponent schema={stringified} config={config}/>;
- return ReactDOMServer.renderToString(component);
+ return ReactDOMServer.renderToString(() => component);
}
The good news is that by updating only that line, the generator still works with react@17
But yes, this PR cannot be merged before applying the change in the HTML template
Hello, @leon19! 👋🏼
I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
At the moment the following comments are supported in pull requests:
- `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
- `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
- `/autoupdate` or `/au` - This comment will add `autoupdate` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
@leon19 so looks like that even if we fix HTML template, the upgrade is a breaking change for generator that depends on react sdk