enalmada / bs-ant-design Goto Github PK
View Code? Open in Web Editor NEWThis project forked from thangngoc89/bs-ant-design
Bucklescript + ReasonReact binding Ant Design
This project forked from thangngoc89/bs-ant-design
Bucklescript + ReasonReact binding Ant Design
This fork of the project has a Form
component definition that doesn't match upstream. While there's a fair bit of divergence by virtue of targeting JSX 3, the definition in this fork doesn't appear to be all that usable. In particular, Ant expects you to call a create
function to wrap its Form
element, giving you something with FormComponentProps
, which is needed to validate and extract form values. Basically, it's needed to work with Ant's version of controlled form components. That function is not imported here, so the Form
component can't be wrapped.
Would be ideal to figure out how to allow this if reason can support it.
Not a priority as of now, but we should keep it in mind.
Right now every component breaks upon updating ant to 3.18.x.
The fix seams to be rewriting
[@module] external reactComponent: React.component('a) = "antd/lib/package"
to
[@module "antd/lib/package" ] external reactComponent: React.component('a) = "default"
Didn't yet check why is it an issue, maybe we could do something to omit changing every file.
BuckleScript 7.1.0 ships with refmt 3.6.0 and I think it's a bit stricter than older versions were. I'm seeing a couple problems with type definitions in the Antd_Form
component:
We've found a bug for you!
/home/nirvdrum/dev/workspaces/todo-app/node_modules/bs-ant-design-alt/src/Antd_Form.re 43:8-30
41 ┆ ~wrapperCol: option(Antd_Grid.Col.props)=?,
42 ┆ ~colon: option(bool)=?,
43 ┆ ~children: React.element=?,
44 ┆ ) =>
45 ┆ React.createElement(
ReasonReact: optional argument annotations must have explicit `option`. Did you mean `option(React.element)=?`?
We've found a bug for you!
/home/nirvdrum/dev/workspaces/todo-app/node_modules/bs-ant-design-alt/src/Antd_Form.re 113:10-32
111 ┆ ~style: option(ReactDOMRe.Style.t)=?,
112 ┆ ~colon: option(bool)=?,
113 ┆ ~children: React.element=?,
114 ┆ ) =>
115 ┆ React.createElement(
ReasonReact: optional argument annotations must have explicit `option`. Did you mean `option(React.element)=?`?
I'm not sure if there are other components that are similarly impacted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.