uqbar-project / njsx

A customizable and declarative interface for creating React and React Native components without JSX syntax.
Other
34 stars 4 forks source link

Bug: Basic Objects are treated as children when they contain the key "type" #9

Open 3dGrabber opened 2 years ago

3dGrabber commented 2 years ago

^Title

This makes it impossible to create an input element:

const usernameInput = input({type: "text"    , id: "Username"})
const passwordInput = input({type: "password", id: "Password"})

The above will produce the following error:

Uncaught Error: Objects are not valid as a React child (found: object with keys {type, id}).