nerp-tech / react-fab

Floating Action Buttons for React
https://github.com/nerp-tech/react-fab-example
MIT License
4 stars 5 forks source link

Warning: Received `false` for a non-boolean attribute `active`. #9

Open jaspreet-alef opened 5 years ago

jaspreet-alef commented 5 years ago

Seems like FabButton component needs 'active' prop value as string, rather than boolean. Please fix it. Full issue as below:

Warning: Received false for a non-boolean attribute active.

If you want to write it to the DOM, pass a string instead: active="false" or active={value.toString()}.

If you used to conditionally omit it with active={condition && value}, pass active={condition ? value : undefined} instead. in span (created by Classes) in button (created by FabAction) in div (created by FabAction) in FabAction (created by Classes) in div (created by FabActions) in FabActions (created by Classes) in div (created by Fab) in Fab (created by Classes) in div (created by Classes) in div (created by Query) in div (created by Query) in main (created by Query) in div (created by Query) in Query (created by MainLayout) in MainLayout (created by Route) in Route (created by withRouter(MainLayout)) in withRouter(MainLayout) (created by Classes) in Classes (created by Mutation) in Mutation (created by Apollo(Classes)) in Apollo(Classes) (created by Mutation) in Mutation (created by Apollo(Apollo(Classes))) in Apollo(Apollo(Classes)) (created by Mutation) in Mutation (created by Apollo(Apollo(Apollo(Classes)))) in Apollo(Apollo(Apollo(Classes))) (created by Query) in Query (created by Apollo(Apollo(Apollo(Apollo(Classes))))) in Apollo(Apollo(Apollo(Apollo(Classes)))) (created by Route) in Route (created by App) in Switch (created by App) in Router (created by App) in div (created by App) in App (created by Component) in t (created by Component) in ApolloProvider (created by Component)

idmontie commented 5 years ago

What is your code to reproduce this issue?

jaspreet-alef commented 5 years ago

@idmontie below is my code

    <Fab >
      <FabButton>
        <span>+</span>
      </FabButton>
      <FabActions>
        <FabAction
          onClick={()=>{}}
          tooltip='Add'
        >
          +
        </FabAction>
        <FabAction
          tooltip='Clear'
          onClick={()=>{}}
        >
        <span>+</span>
        </FabAction>
      </FabActions>
    </Fab>