Coder Social home page Coder Social logo

Comments (3)

flying-sheep avatar flying-sheep commented on July 2, 2024 1

hmm, works for me.

$ wget https://raw.githubusercontent.com/capaj/react-datetime/master/src/YearsView.js
$ npm run build
$ npx babel --plugins ./lib YearsView.js
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _createReactClass = _interopRequireDefault(require("create-react-class"));

var _reactOnclickoutside = _interopRequireDefault(require("@capaj/react-onclickoutside"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var DateTimePickerYears = (0, _reactOnclickoutside.default)((0, _createReactClass.default)({
  render: function render() {
    var year = parseInt(this.props.viewDate.year() / 10, 10) * 10;
    return <div className='rdtYears'>{[<table key='a'><thead><tr>{[<th key='prev' className='rdtPrev' onClick={this.props.subtractTime(10, 'years')}><span>‹</span></th>, <th key='year' className='rdtSwitch' onClick={this.props.showView('years')} colSpan={2}>{"".concat(year, "-").concat(year + 9)}</th>, <th key='next' className='rdtNext' onClick={this.props.addTime(10, 'years')}><span>›</span></th>]}</tr></thead></table>, <table key='years'><tbody>{this.renderYears(year)}</tbody></table>]}</div>;
  },
  ...
};

...

can you give me a reproducible example as a sequence of shell commands?

maybe some .babelrc or something interferes

from babel-plugin-transform-react-createelement-to-jsx.

capaj avatar capaj commented on July 2, 2024

works flawlessly when I use --no-babelrc. Thanks

from babel-plugin-transform-react-createelement-to-jsx.

flying-sheep avatar flying-sheep commented on July 2, 2024

ah! happy my hunch has helped here!

from babel-plugin-transform-react-createelement-to-jsx.

Related Issues (7)

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.