Closed quantuminformation closed 5 years ago
Thanks for suggestion @QuantumInformation. I will try to do that as soon as I can find some free time.
I am trying to move my Typescrit project (one I created from React Boilerplate) to Create React App but the problem is CRA uses Babel Typescript transpiler and it has no support for Typescript namespaces !
https://github.com/babel/babel/issues/8244
It's a big problem when you use Swagger Codegen to generate API clients and you use enums in your Swagger file since enums are defined in namespaces. I had the same problem with a React Native project and had to bypass Babel TS transpiler.
One solution may be to eject React Scripts and replace babel-loader in webpack config file with awesome-typescript-loader for example. But I had not tested it yet.
Obviously the best solution would be to change the way Swagger Codegen works with enums. But it looks a bit complex !
I probably found a better solution : using Open API generators to generate my API client from Swagger, since they don't use namespaces. I am giving it a try ! And moreover the generated code is cleaner.
I'm willing to fund this issue.
I think this issue will allow the patterns expressed here to fit in easier to other CRA apps based on my efforts this week.
My card keeps getting declined by stipe(
The credit card form is pretty bad for that stripe widget.
@issuehunt has funded $150.00 to this issue.
I'll be working on this today
Top man
On Sat, 13 Apr 2019 at 10:25, Piotrek Witek notifications@github.com wrote:
I'll be working on this today
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/piotrwitek/react-redux-typescript-guide/issues/151#issuecomment-482788785, or mute the thread https://github.com/notifications/unsubscribe-auth/AANN9gWFDzhZcwHIc0ZveM9BkJQe5Km9ks5vgZSRgaJpZM4cLL2Y .
--
Kind regards
Nikos Katsikanis
@piotrwitek has rewarded $105.00 to @piotrwitek. See it on IssueHunt
Nice work!
Now that Create react app has typescript support, I would suggest using that, to make this project fit closer to real-world projects. All of my clients use Create react app for typescript.