Installing Components from NPM
Additional components can be installed via npm.
Suggested Components
Details
Because Idyll is built on top of React, any React component can be used in Idyll. If you install a component using npm
, Idyll will automatically be able to find it without any additional configuration.
For example:
$ npm install some-react-component
This could then be used in your markup as
[SomeReactComponent /]
Internally, this is equivalent to require('some-react-component')
. If you need to access a property of the imported module, you can do it like this:
[SomeReactComponent.nested.Property /]
This is equivalent to require('some-react-component').nested.Property
.
Continue to custom components.