Skip to content
J

jsx-control-statements

Neater control statements (if/for) for jsx

by alexgilleranFree

#1000in UI Libraries
0In stores

Description

JSX Control Statements is a Babel plugin that adds basic control statements to JSX: conditionals and loops, written as component-like tags.…

Highlights

  • Conditionals and loops as JSX tags
  • Compiles to plain JavaScript
  • Works with React and React Native
  • Only dependency is Babel
  • ESLint and Flow linting notes

Ratings & Reviews

No ratings yet

Be the first to rate jsx-control-statements.

People also visit

S

style-it

Component for writing plaintext CSS in React apps -- isomorphic, scoped

UI Libraries
Launch
H

html-to-react

A lightweight library that converts raw HTML to a React DOM structure

UI Libraries
Launch
U

uncontrollable

Wrap a controlled react component

UI Libraries
Launch
R

react-paginate

A ReactJS component that creates a pagination

UI Libraries
Launch
R

react-swipeable-views

A React Component for binded Tabs and Swipeable Views

UI Libraries
Launch
R

react-json-viewer-cool

React json view plugin, supports expansion and hiding. Uses react hooks

UI Libraries
Launch

jsx-control-statements FAQ

What does JSX Control Statements add?

If and For tags in JSX, plus Choose and With tags, which compile to ordinary JavaScript expressions.

How do I install it?

It is a Babel plugin. The README's Installation section covers adding it to your Babel setup.

Will it break my tooling?

It might. The README warns that tools that read your source, such as static analysis and TypeScript, may not work with code the plugin changes.

Is there an option without a plugin?

Yes. The README describes using && and map in plain JavaScript, and suggests that route if you want to stay on the well-trodden path.

Does it work with React Native?

Yes. The README says it is compatible with React and React Native.

What are the best jsx-control-statements alternatives?

Popular alternatives to jsx-control-statements include style-it, html-to-react and uncontrollable. See all jsx-control-statements alternatives

Developer Stuff

Badges