我正在尝试在ReasonReact项目上使用可排序的列表组件(react-sortable-hoc)。但是我遇到了一个错误,我试图弄清楚几个小时。
我遵循的步骤:
.positionr {
display: flex;
align-items: center;
}
sortableContainer()
和sortableElement()
的@bs绑定
react-sortable-hoc
和SortableContainer.js
代码段
/* SortableContainer.re */ [@bs.val] [@bs.module "react-sortable-hoc"] external sortableContainer : 'a => ReasonReact.reactClass = ""; let sortableContainerReactClass: ReasonReact.reactClass = sortableContainer(() => {
/* SortableElement.re */ [@bs.val] [@bs.module "react-sortable-hoc"] external sortableElement : 'a => ReasonReact.reactClass = ""; let sortableElementReactClass: ReasonReact.reactClass = sortableElement(() => {
/* List.re */ let component = ReasonReact.statelessComponent("List"); let make = (~items=[||], _children) => { { ...component, render: (_self) => { } } };
编译此代码时,我收到此错误。
# ERROR We've found a bug for you! /Users/jaisonjustus/code/todotabre/src/components/SortableContainer.re 5:34-48 3 │ 4 │ let sortableContainerReactClass: ReasonReact.reactClass = sortableConta iner(() => { 5 │
此代码有什么问题?