GithubHelp home page GithubHelp logo

martinandert / react-interpolate-component Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 6.0 34 KB

A component for React that renders elements into a format string containing replacement fields.

License: MIT License

Makefile 3.79% JavaScript 96.21%

react-interpolate-component's People

Contributors

martinandert avatar mathieulesniak avatar ptrwllrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-interpolate-component's Issues

render throws when passing an empty string as children

Hi,

When I use React-translate-component and the resource value is an empty string
The underlying interpolate component throws a Interpolate expects either a format string as only child or a 'format' prop with a string value error

this is because

this.props.children || this.props.format --> results in undefined
example:
"" || undefined => undefined

see: https://github.com/martinandert/react-interpolate-component/blob/master/index.js#L22

Is this expected behavior?

with kind regards,

Ronald van der Kooij

Could we add mustache {{}} to this

I like your react component and the idea of a interpolate field. Would you accept a PR or thing it feasible to add additional template bracketing support

React v17 incompatible error

I was trying to upgrade a react-app create using node v14 and react v14 to react v17 and node v18. The react-interpolate only accepts react v16, so on running npm install I am facing dependency resolution issues. Can the application be upgraded to accept react v17 or if I can collaborate to the project for the same?

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.