'Native Base: how to find source code of <Input>?

I'm using the <Input> component from Native Base in my React Native app.

I want to find the source code, so I looked in node_modules/native-base/src/index.js and it has a line that says import { Input } from './basic/Input';. So I went to node_modules/native-base/src/basic/Input.js. I tried editing this file in order to see whether it affected the Input I had have rendered in my app, and thus confirm whether this is the correct source file. Nothing changed anything; even when I commented out the entire Input.js file, nothing changed.

Where did I go wrong here, and how should I approach finding this file?



Solution 1:[1]

 *render() {
        const { input, meta, ...inputProps } = this.props;
    
        return (
          <InputGroup underline>
            <Input
              onChangeText={input.onChange}
              onBlur={input.onBlur}
              onFocus={input.onFocus}
              value={input.value}
              {...inputProps}
            />
          </InputGroup>
        );
      }*

Solution 2:[2]

If you wanted to check the source code, then checkout

If you want to update the files in your node_modules, you need to know a few things

  1. Usually node_modules/native-base/src should be the last place you should visit. Because bundlers usually don't look into this.
  2. So the code which is actually being used, exist in either of the 2 place based on your bundler. node_modules/native-base/lib/module/components/primitives/Input/Input.tsx node_modules/native-base/lib/commonjs/components/primitives/Input/Input.tsx

NOTE: My answer is based on the assumption you're NativeBase version 3.x. For 2.x file path may change a little.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Rehman