Giter Club home page Giter Club logo

Comments (8)

ithustle avatar ithustle commented on August 14, 2024 2

You rock!

from react-native-material-tabs.

ithustle avatar ithustle commented on August 14, 2024 1

Oh damn! Shame on me... I've put setTab function inside render() ... My bad. Sorry. It's solved. Thanks for your time :)

from react-native-material-tabs.

iRoachie avatar iRoachie commented on August 14, 2024 1

In your items array, just add a key on to the items.

<FontAwesome name={"home"} size={24} style={[styles.icons, { color: "#fff" }]} key="home" />

from react-native-material-tabs.

iRoachie avatar iRoachie commented on August 14, 2024

Did you define the setTab function you have there?

from react-native-material-tabs.

ithustle avatar ithustle commented on August 14, 2024

Yep. Something like:

setTab = selectedTab => { console.log(selectedTab) this.setState({ selectedTab: 1 }); }

from react-native-material-tabs.

iRoachie avatar iRoachie commented on August 14, 2024

Can you show the whole example or recreate part of it on https://snack.expo.io that reproduces this?

from react-native-material-tabs.

iRoachie avatar iRoachie commented on August 14, 2024

All good! Glad you got it sorted out

from react-native-material-tabs.

ithustle avatar ithustle commented on August 14, 2024

One more thing:

How can I avoid Warning: Encountered two children with the same key, null. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. using components on items instead text?

from react-native-material-tabs.

Related Issues (20)

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.