Code Monkey home page Code Monkey logo

Comments (12)

cwoolum avatar cwoolum commented on June 6, 2024 1

The UI Components team just published them as @aws-amplify/ui-react@next. That should have everything you need. If not, talk to @hvergara

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

Actually this might just be me being dumb - I tried to npm install @aws-amplify/ui-react, but it does not seem to export a lot of what's needed for the code to work - specifically View and getOverrideProps

What version of this library do I need to be using?

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

Beautiful, that works!

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

Actually never mind, it doesn't work. I am seeing this error:

Screen Shot 2021-09-15 at 12 46 12 PM

from amplify-codegen-ui.

hvergara avatar hvergara commented on June 6, 2024

are you using the dev tarballs? package names should be @aws-amplify/ui-react-next and @aws-amplify/ui-next instead

from amplify-codegen-ui.

dpilch avatar dpilch commented on June 6, 2024

This seems to be a React issue when transpiling to ES5. As a work around for now you can use ES6.

Could you try manually updating the generated component to remove the default after react_1 and see if that works?

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

Removing .default fixed it! I'll leave this open to track the fix on your end, but for now I'll use ES6 as you suggested.

from amplify-codegen-ui.

frimfram avatar frimfram commented on June 6, 2024

what is the JSON that goes with this problem - JSON would be great because then I can run it in my test program.

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

The json is in the description

from amplify-codegen-ui.

johnpc avatar johnpc commented on June 6, 2024

@dpilch - it does not work with even the latest ES versions. Same issue.

from amplify-codegen-ui.

dpilch avatar dpilch commented on June 6, 2024

You will likely need to change the module type (or omit) on the render config as well.

new AmplifyRenderer(component, {
  module: ModuleKind.ESNext,
  target: ScriptTarget.ES2017,
  script: ScriptKind.JS,
})

The typescript transpiler we are using underneath seems to ignore other settings if CommonJS is set. We can add errors for that in the future.

from amplify-codegen-ui.

renebrandel avatar renebrandel commented on June 6, 2024

Asana tracking link: https://app.asana.com/0/1200599634514309/1200993480703740/f

from amplify-codegen-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.