We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the below example, changing content will cause first render to be called a second time.
content
first render
This is really problematic for trying to manage the lifecycle of any components that are children of plugs.
const Parent = ({ children, setContent }) => { return ( <div> <Slot /> <Button onClick={() => setContent('updated content')}> Set Content </Button> {children} </div> ) } const UnderChild = ({ content }) => { useEffect(() => { console.log('first render') }, []) return <div>{content}</div> } const Child = ({ content }) => { return ( <Plug deps={[content]}> <UnderChild content={content} /> </Plug> ) } const App = () => { const [content, setContent] = useState('Initial Content') return ( <SlotProvider> <Parent setContent={setContent}> <Child content={content} /> </Parent> </SlotProvider> ) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the below example, changing
content
will causefirst render
to be called a second time.This is really problematic for trying to manage the lifecycle of any components that are children of plugs.
The text was updated successfully, but these errors were encountered: