react-primitives-textinput
Cross platform <TextInput>
component for React.
Getting Started
Setting up Resolver
You need to setup a resolver to use the correct file for your platform.
You can do this with a custom Webpack or Rollup config.
e.g. for web:
webpack.config.js
const baseConfig = ... ; moduleexports = resolve = ...baseConfig extensions: '.web.js' '.web.jsx' ...baseConfigresolveextensions ;;
TextInput
Component:
Building a Shared import TextInputPrimitive from 'react-primitives-textinput'; const TextInput = props <TextInputPrimitive />;TextInputdefaultProps = style: borderWidth: 1 borderColor: 'gray' ; ;