support react hook about sdk.js?
See original GitHub issueHi, I am using next.js and react hook and sdk.js the sdk url is https://static.line-scdn.net/liff/edge/2/sdk.js
I have a error when passing query string to Liff v2, ex: https://liff.line.me/1654356111-zzzzzzzz?userId=aaa, But if I don’t pass query string then no error.
code example:
useEffect(() => {
initializeLiff('a real id')
})
function initializeLiff(myLiffId) {
liff
.init({
liffId: myLiffId
})
.then(() => {
// start to use LIFF's api
console.log('initializeLiff ok')
})
.catch((err) => {
console.log(err.code, err.message);
});
}
return (
<React.Fragment>
<Head>
<script charSet="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
</Head>
</React.Fragment>
)
I would appreciate your help.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Hooks API Reference - React
Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class. This page...
Read more >Getting Started With The React Hooks API - Smashing Magazine
React Hooks are in-built functions that allow React developers to use state and lifecycle methods inside functional components, they also work ...
Read more >React hooks - Optimizely
The React SDK provides the following React hooks: Retrieve the status of a feature flag and its variables. This can be useful as...
Read more >How To Call Web APIs with the useEffect Hook in React
In this step, you set up a service to retrieve data from an API. You learned how to call the service using the...
Read more >Hooks - React Redux
Hooks · We recommend using the React-Redux hooks API as the default approach in your React components. · The selector function should be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @natehsu, Thank you for your question, and I’m very sorry about the lack of response. Could you please share the error message you are seeing?
@smwilk Thank you for the information.