ReactNativeFiberHostComponent: Calling `getNode()` on the ref of an Animated component is no longer necessary.
ReactNativeFiberHostComponent: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.
The code is working fine I am but getting this warning. Here is my implementation.
` import React, {useState} from 'react'; import { Image, View, Text, TouchableOpacity } from 'react-native'; import Accordion from 'react-native-collapsible/Accordion';
import styles from './styles';
export default () => { const [active, setActive] = useState([0]) const SECTIONS = ['1','1','1','1','1','1','1'];
const renderHeader = (section, _, isActive) => {
return (
<View><Text>Header</Text></View>
)
}
const renderContent = (section, _, isActive) => {
return (
<View><Text>Content</Text></View>
)
}
const updateSections = section => {
setActive(section)
}
return ( <Accordion activeSections={active} sections={SECTIONS} touchableComponent={(props) => <TouchableOpacity {...props} />} renderHeader={renderHeader} renderContent={renderContent} onChange={updateSections} /> ) } `
Same problem +1
goto node module -> react-native-collapsible -> collapisble.js
on line# 88 replace this.contentHandle.getNode().measure((x, y, width, height) => {
with
let ref; if (typeof this.contentHandle.measure === 'function') { ref = this.contentHandle; } else { ref = this.contentHandle.getNode(); } ref.measure((x, y, width, height) => {
A pull request is also created! :)
Same problem ! +1
Same issue. Fixed with code above.
Yup, same here guys after update to RN 62